6. Working with Arrays, Table Fields, and Collections : Arrays : How You Can Manipulate Arrays : Fence Diagram for Row States and Transitions
 
Share this page                  
Fence Diagram for Row States and Transitions
The following illustration summarizes the effects of programming statements and user actions on array row states:
The vertical lines represent the starting and ending row states.
The arrows are labeled to indicate the statement or action that causes the state to change.
The numbers in parentheses to the right of each row state indicate the numeric value of the row state constants.
The following statements illustrate a few possibilities:
If a user opens a new row by selecting the Insert New Row operation of a default control button, the row state changes from nonexistent to RS_UNDEFINED.
If the user changes the newly inserted row, the row state changes from RS_UNDEFINED to RS_NEW.
If the 4GL code makes an assignment to the newly inserted row, the row state does not change; therefore the arrow in the fence diagram begins and ends at the same position.
If a row with a row state of RS_NEW is deleted, its row state becomes nonexistent.
If a row with a row state of RS_UNCHANGED is deleted, its row state becomes RS_DELETED.