%HI_ChangeRow function


Function
The function changes the index of the currently updated row of the object of Structured variable type.
Declaration
INT%HI_ChangeRow(
   HBJ in refToStruct, 
   INT in indexClose, 
   INT in indexOpen
 ) 

Parameters
refToStruct Reference to the object of Structured variable type.
indexClose Closed row.
indexOpen Opened row.

Description
The function terminates updating the values of the structured variable row given by the parameter indexClose and, at the same time, opens the row given by the parameter indexOpen. The structured variable is defined by the parameter refToStruct of HBJ type (for example: SV.Structure\HBJ). Values of the parameter indexClose and indexOpen are not checked because of the size of the structured variable.

Return value is ERR_NO_ERROR when the function was successfully executed.


Note
For purposeful use of the function, there must be enabled filtering the structured variable values - creating an indexed local variable for the structured variable with enabled filtering.

The function %HI_ChangeRow can be also replaced by means of the functions %HI_CloseRow a %HI_OpenRow as follows:


 
INT  _retCode
 INT  _indexOpen
  INT  _indexClose

 _retCode := %HI_ChangeRow(SV.Structure\HBJ, _indexClose, _indexOpen)

 

Equivalent declaration:


 
INT  _retCode
 INT  _indexOpen
 INT  _indexClose
 
 %HI_CloseRow(SV.Structure\HBJ, _indexClose)
 _retCode := %HI_OpenRow(SV.Structure\HBJ, _indexOpen)

Napíšte komentár