6. Working with Arrays, Table Fields, and Collections : Table Field Operations : How You Can Enable and Disable User Modifications to Table Field Data : How You Can Append Rows to the End of a Table Field
 
Share this page                  
How You Can Append Rows to the End of a Table Field
The user can append a row at the end of the table field by choosing the row below the last row with data, and then directly editing it (if appending is enabled). The CurOps attribute of the table field determines whether appending is enabled.
To enable a row to be appended, the CurOps attribute is set to OP_APPEND. To disable this capability, set CurOps to OP_NONE. CurOps can be set directly, or you can use one of the following attributes:
ReadOps
UpdateOps
QueryOps
User1Ops
User2Ops
User3Ops
You can use the Property Inspector to initialize these attributes. Also, they can be changed dynamically in 4GL.
The following settings determine whether a user can append rows to a table field:
OP_APPEND
Specifies that the user can append rows to the end of the array by moving the cursor past the last row displayed in the table field
OP_NONE
Specifies that the user cannot append rows to the end of the array by moving the cursor past the last row displayed in the table field
OP_APPENDINSERT
Specifies that the user can append or insert rows to the table field
OP_APPENEDDELETE
Specifies automatic append at the end of the table field and that the user can delete rows
OP_APPENDINSERTDELETE
Specifies that the user can perform all operations on the table field
The setting that you specify with these attributes occurs only when the frame is in the corresponding mode. For example, if you set the QueryOps attribute while the frame is in Read mode, the QueryOps setting does not take effect until the frame is displayed in Query mode.
To change the setting immediately, regardless of the frame's mode, use the CurOps attribute of the TableField system class. This attribute accepts the same two settings as do the other operations attributes.
OpenROAD changes the operation setting for the current mode of the frame to the setting specified for the CurOps attribute. For example, if a frame is in Update mode and you set CurOps to OP_APPEND, then OpenROAD automatically sets the UpdateOps attribute to OP_APPEND also.