Skip Headers
JD Edwards EnterpriseOne Tools Development Tools: Form Design Aid Guide
Release 8.98 Update 4

Part Number E14706-02
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

26 Understanding Parent Child Controls

This chapter contains the following topics:

26.1 Parent Child Controls

The parent child control is a composite control with a tree on the left and a grid on the right. The control is used to provide a hierarchical view of the business data. Users can resize the tree part of the control during runtime. The tree and grid portions use the same business view, if one is attached. If an editable parent child control links to a business view and the user has edited the content, the change is saved by runtime when the form is saved.

At most, a form can contain a single parent child control. Additionally, a form cannot contain both a parent child control and a grid control. You cannot place a parent child control on a tab page; although you can nest a reusable subform containing a parent child control on a tab page.

You can add data dictionary (DD) items to the grid. Because of its similarity to a grid control, many of the properties for parent child controls are the same.

After you configure the control, you set up either a parent/child relationship or use event rules (ER) to load child nodes to the tree. The method that you use depends on whether the table has an inherent parent/child relationship.

You can use ER and system functions to customize the way in which the parent child control functions. For example, you can change the top node of a tree or change the node that appears as the first child on a tree.

To increase performance during runtime, parent child controls can make use of page-at-at-time processing. Page-at-a-time processing ensures that each fetch fetches only one page of data. Page-at-a-time processing is the default mode for all parent/child forms. During page-at-a-time processing in standard mode, the page size is the number of nodes that can fit in the current view. When the Find process begins, only one page of first-level nodes is fetched from the table and inserted in the tree. When the user scrolls down, a new page of data is fetched.

Page-at-a-time processing for the expand-all style of parent/child forms is similar to that for standard mode. When the Find process starts, one page of first-level nodes is fetched from the table and inserted into the tree. Then, all of the first-level nodes are expanded. Each expansion fetches only one page of data. Because the tree expands exponentially in expand-all mode, a deep tree might affect performance.

26.2 Tree Nodes

When the parent and child nodes come from different tables or are of different data types, the parent/child relationship is not automatically set up. In this case, the runtime engine does not automatically fetch the child database records because it does not know the table from which to retrieve them.

If possible, use the runtime engine to load the initial set of parent nodes to the tree for you. You do this by using the based-on view, which is a view over the table for the uppermost node. You can use a parent filter in the control, and the runtime engine loads the first level nodes to the tree. If you cannot do this, you must insert the first-level nodes yourself. To do this, you typically use table I/O on the Button is Clicked event of the Find button. You use the same methods that you use to insert child nodes. Use a Suppress Find system function to stop the runtime engine from attempting to load any nodes.

Whenever a node is expanded, the system function, Suppress Fetch on Node Expand, is called from the event, Tree Node Is Expanded. This function tells the runtime engine not to do any fetches because ER will handle the loading of the child nodes. Tree Node Is Expanding is the main event of the application. This event occurs when the tree node is expanding (such as when the plus next to a child node is expanded for the first time). You place ER on this event to read the next records to be loaded to the tree as children of the expanded node. You can use table I/O or business functions to retrieve these records. Often the children come from different tables, based on the type of parent node that is expanded. If possible, you should perform a SELECT and then use the FETCH NEXT command to retrieve records in a DO WHILE loop. The grid buffer (GB) runtime data structure is populated with data from the records read in the loop, and then an Insert Grid Buffer Row system function is called. This parent/child system function is different from the Insert Grid Buffer Row in the normal grid section. At this point, you also can set custom tree bitmaps using the Set Tree Node Bitmap system function.

26.3 Lean Manufacturing

Lean manufacturing (also known as Psynch or Product synch) is a special mode of the parent child control that was created to be used in applications designed to support lean manufacturing processes. It displays a parent child grid in a graphical format specific to lean manufacturing. In many respects, including runtime processing, the lean manufacturing control functions in the same way as the standard parent child control.

26.4 Parent Child Control Design-Time Considerations

This section discusses parent child control properties and power forms.

26.4.1 Parent Child Control Properties

Parent child controls are a specialized form of the grid control. Therefore, many of the design options that apply to grid controls also apply to parent child controls. This table details some key design-time settings specifically for the parent child control and their impact. All locations are relative to the parent child control Properties form:

Setting Impact
Multiple Select Select this option to permit the user to select multiple lines to affect with a single operation. If cleared (the default), users cannot affect multiple nodes for operations such as cut-and-paste.
Disable Drag & Drop (Move), Disable Copy, Disable Drag & Drop (Cut/Copy/Paste), Move Up and Down, Indent and Outdent Select these options to enable the user to affect the contents and organization of the tree.
Location Indicator Feature Select this option to provide a button that permits the user to toggle showing and hiding location indicators in the tree. The location indicator is a numerical representation of the position of a node in the tree.
Expand All/Collapse All Select this option to provide a button for the user to expand or collapse the entire tree.

26.4.2 Parent Child Control and Power Forms

If you place the parent child control on a power edit form, an embedded subform on a power edit form, or an editable reusable subform, then the parent/child will be editable within these parameters:

  • Both tree columns and the grid columns (except for parent child relationship columns) are editable unless they have been rendered read-only by application logic.

  • Columns that define the parent/child key relationship are not editable.

  • Runtime provides format and validation for grid cells and tree nodes, similar to the one provided for regular grid.

  • The column events, Column Is Exited, Column Is Exited and Changed In-Line, and Column Is Exited and Changed - Asynchronous, are supported for the tree column and all grid columns.

  • The row events, Row Is Exited, Row Is Exited and Changed In-Line, Row Is Exited and Changed - Asynchronous, are supported for parent child controls.

  • The event sequence is the same as the grid event sequence.

  • Form default buttons such as OK and Delete work for parent child controls as they do for grid controls.

At most, a power form or a subform can contain a single parent child control directly. However, a power form can contain multiple subforms, and each subform can contain a parent child control. Similarly, while you cannot place a parent child control on a tab page, you can create a subform as a tab page and that subform can contain a parent child control.

26.4.3 Lean Manufacturing Properties

Place the parent child control in PSYNC mode. This enables the Product Sync Mapping property for grid columns in the control. For every item in the property, you must place a corresponding column in the grid and map it to the property.

Grid columns in the parent child control in PSYNC mode have the Product Synch Mapping property. This list summaries its parameters:

  • Attach Path to Segment

    Parameter 2 no longer permits the <Currently Selected Row> special value.

  • Change Row Selection

    Parameter 3 special value is <Unselected> (as opposed to <Deseleted>).

  • Set Action

    Parameter 2 has no special values. Parameter 3 special values are <Enabled (1)> and <Disabled (0)>.

26.5 Parent Child Control Events

These events can fire on the parent child control during runtime:

Many of these events are unique to parent child controls and can be categorized for discussion:

26.5.1 Selecting Tree Nodes

The Tree Node Selection Changed event runs every time a user selects a tree node, either by clicking it once with the mouse or by moving an arrow up and down the nodes. You can place ER that needs to run when a mode is selected on the Tree Node Selection Changed event. The Work Center application uses this feature to load the media object that appears next to the tree with the message information for each node. You can also use this event when you need to protect controls or exits, based on the kind of node that the user selects.

26.5.2 Performing Drag-and-Drop or Copy/Cut/Paste

If you enable the functionality, users can affect the tree structure by adding, moving, and deleting nodes. In Windows environments, users accomplish these tasks with drag-and-drop functions. In Web environments, users accomplish these tasks with copy/cut/paste.

When you place the control on a form initially, all three options are enabled:

  • Cut (drag-and-drop move).

  • Copy.

  • Cut-copy-paste (drag-and-drop).

You can disable these options at design time. When an option is enabled and a user attempts the operation, the cursor indicates that the function is not permitted, and none of the associated events execute. You can control operations to the database using these events:

  • Tree - Begin Drag/Cut/Copy

    If you enable any of the three operations, the Begin Drag event fires, and the drag mode is set to Move for the first two operations (cut or copy). The mode is set to Copy for the third operation (cut-copy-paste).

  • Tree - Drag Over Node

    You can attach ER to this event to verify that the node on which the dragged record is about to be dropped is a valid situation. If it is not, you can use a system function to change the cursor to a No Drop cursor to indicate that dropping the record there is not permitted. If the cursor is not the No Drop cursor, when the record is dropped the event, Tree - End Drag Drop/Paste, runs. The same is true of cut-and-paste or copy-and-paste operations.

  • Tree - End Drag Drop/Paste

    You can attach ER to this event to update or insert information that has been moved or copied using the drag. Be aware of the effect of using Insert Grid Buffer Row in the Tree -End Drag Drop/Paste event, as well as deleting the grid row dragged if the mode is a move.

  • Tree - Cancel Drag Drop/Paste

    No matter the operation, if the user cancels, then this event occurs.

In addition to drag-and-drop or copy/cut/paste, users (and applications) can simply move nodes up and down or change their hierarchical level (indent and outdent). These events are provided in connection with these activities:

  • Node Move Up Verify Before

    When an attempt to move a node up occurs, runtime fires this event. If the system function, Suppress Node Move Up/Down is called within this event, then move up is canceled. Otherwise, runtime moves the node upwards one position and then fires the event, Node is Moved Up.

  • Node Is Moved Up

    When a node has been moved up by one position (if permitted on the event, Node Move Up Verify Before), then the event, Node is Moved Up, is fired for that node. Its child nodes are still parented to the moved node. You cannot move a node that is the first node on its level up.

  • Node Move Down Verify Before

    When an attempt to move a node down occurs, runtime fires this event. If the system function, Suppress Node Move Up/Down is called within this event, then move down is canceled. Otherwise, runtime moves the node downwards one position and then fires the event, Node is Moved Down.

  • Node Is Moved Down

    When a node has been moved down by one position (if permitted on the event, Node Move Down Verify Before), then the event, Node is Moved Down, is fired for that node. Its child nodes are still parented to the moved node. You cannot move a node that is the last node on its level down.

  • Node Indent Verify Before

    When an attempt to indent a node occurs, runtime fires this event. If the system function, Suppress Node Indent/Outdent, is called within this event, then indent is canceled. Otherwise, runtime demotes the node to be a child of its previous sibling (the demoted node remains the parent of its children). Then the event, Tree Node is Indented, is fired.

  • Tree Node is Indented

    When a node has been indented (if permitted on the event, Node Indent Verify Before), then the event, Tree Node is Indented, is fired for that node. Its child nodes are still parented to the indented node. The application must update the node's internal data to reflect its new parent. You cannot indent a node that is the first node on its level.

  • Node Outdent Verify Before

    When an attempt to outdent a node occurs, runtime fires this event. If the system function, Suppress Node Indent/Outdent, is called within this event, then outdent is canceled. Otherwise, runtime promotes the node to be a parent of the sibling beneath it. The original parent becomes the sibling of the outdented node. If the outdented node is the first child, then the original parent loses all of its children to the outdented node and becomes a leaf node. The child nodes of the outdented nodes are otherwise unaffected. Then the event, Tree Node is Outdented, is fired.

  • Tree Node is Outdented

    When a node has been outdented (if permitted on the event, Node Outdent Verify Before), then the event, Tree Node is Outdented, is fired for that node. The application must update the node's internal data to reflect its new parent.

  • Tree Node Bitmap is Clicked

    Under most conditions, each node in the tree has a bitmap next to it for display purposes only. You can use Set Tree Node Clickable Bitmap to provide an additional bitmap which is clickable; that is, clicking the bitmap causes the event, Tree Node Bitmap is Clicked, to fire.

26.5.3 Expanding and Collapsing Nodes

ER exists to signal when a node has been expanded or collapsed. These events occur whether the change in the node's status is due to the user or the application:

  • Tree Node Is Expanding

    This event occurs when a node is expanded for the first time after control initialization.

  • Tree Node Is Collapsing

    This event occurs when a node is collapsed after control initialization.

26.5.3.1 Example: Using the Tree Node is Expanded Event

In this example, ER is attached to an application on the Tree Node Is Expanding event:

Suppress Fetch on Node Expand(FC parent/child)
//
// Here are the variables to get out of the account and the business unit loop
// being initialized.
VA frm_OutOfLoop = "0"
VA frm_ExistAcctLoop = "0"
//
// If Loop looking at the GC Business Unit Field.
If GC BusinessUnit is equal to <Blank>
//
// Select the F0006 differently if there is one company or all companies
//
F0006.Open
If VA frm_AllCompanies is equal to "1"
VA frm_CurCompany = GC Co
F0006.Select
Else
VA frm_CurCompany = BC Company
F0006.Select
End If
//
// While Loop which fetches the business units for a specific company.
// If the company changes we get out of the loop.
While VA frm_OutOfLoop is equal to <Zero>
// Fetch the records from the F0006 Table.
F0006.FetchNext
GB BusinessUnit = GB Companies
If SV File_IO_Status     is equal to CO SUCCESS      
GB Co = BC Company
VA frm_PreCompany = BC Company
VA frm_ConcateBuDesc = " "
VA frm_ConcateBuDesc = concat([VA frm_ConcateBuDesc],[VA frm_NameOfBU])
GB CompanyStructure = concat([GB Companies],[VA frm_ConcateBuDesc])
GB Companies = concat([GB Companies],[VA frm_ConcateBuDesc])
//
// Tells the Level of the Tree Structure.
GB LevelOfTreeInt = "1"
//
Insert Grid Buffer Row(FC parent/child, <After Last Row>, <Yes>, <No>,
  <No>, <No>, <No>, <Yes>)
Set Tree Node Bitmap(FC parent/child, <Last Grid Row>, BussUnit.bmp, <Yes>)
//
//
If VA frm_PreCompany is not equal to VA frm_CurCompany
VA frm_OutOfLoop = "1"
End If
Else
VA frm_OutOfLoop = "1"
End If
End While
F0006.Close
Else
// Loop thru the F0901 to get the corresponding accounts.
//
VA frm_CURBU = GC BusinessUnit
F0901.Open
F0901.Select
If SV File_IO_Status     is equal to CO ERROR      
//
End If
//
// While Loop to pick up the accounts till the Fetch Fails.
While VA frm_ExistAcctLoop is equal to <Zero>
F0901.FetchNext
GB Sub = VA frm_DBSUB
GB ObjAcct = VA frm_DBOBJ
GB Name = VA frm_AcctDesc
GB BusinessUnit = VA frm_CURBU
VA frm_AcctDesc = concat([VA frm_BLANKS],[VA frm_AcctDesc])
GB AccountID = VA frm_AIDF0901
GC AccountID = VA frm_AIDF0901
If SV File_IO_Status     is equal to CO ERROR      
VA frm_ExistAcctLoop = "1"
Else
GC Companies = " "
GB Companies = " "
Business Unit, Object, Subsidiary Merge
GB Companies = concat([VA frm_DBANI],[VA frm_AcctDesc])
GB CompanyStructure = concat([VA frm_DBANI],[VA frm_AcctDesc])
GC Companies = VA frm_AIDF0901
//
// Tells the level of the Tree Structure '2'
GB LevelOfTreeInt = "2"
//
Insert Grid Buffer Row(FC parent/child, <After Last Row>, <Yes>, <No>, <No>, 
  <No>, <No>, <No>)
Set Tree Node Bitmap(FC parent/child, <Last Grid Row>, accounts.bmp, <Yes>)
End If
End While
End If
FC BUFrom = " "

26.5.4 Clicking Bitmaps

With the system function, Set Tree Node Clickable Bitmap, you can display a bitmap next to a node which fires the event, Tree Node Bitmap is Clicked, when the user clicks the bitmap.

26.6 Parent Child Control System Functions

This section discusses the system functions unique to the parent child control.

In general, you can use system functions to perform these types of tasks in the parent child control:

Users have the ability to change the tree's hierarchical structure by moving nodes up and down. Users can also increase the indent or outdent of a node as well. To prevent vertical changes to the tree structure, use Suppress Node Move Up/Down. To prevent horizontal changes, use Suppress Node Indent/Outdent. Typically, you will call these system functions inside the events, Node Indent Verify Before, Node Outdent Verify Before, Node Move Up Verify Before, or Node Move Down Verify Before, to prevent the user from performing the action (move up/down or indent/outdent).

Under most conditions, each node in the tree has a bitmap next to it for display purposes only. You can use Set Tree Node Clickable Bitmap to provide an additional bitmap which is clickable; that is, clicking the bitmap causes the event, Tree Node Bitmap is Clicked, to fire.

You can use system functions to acquire this information about any node in the tree:

When application logic is used to load the tree instead of the runtime logic, the application must often insert a tree node at a specific location based on data column values. To achieve this, at design time, select a column to be the node ID column. An application can specify a column as the node ID column. The value in this column will be used as a unique identifier for that row. The node ID column can be any data type, but must be unique. Use the system functions, Insert Grid Buffer Row By Node ID and Get Related Node ID, to specify a node ID column. Node ID column and these system functions work together: Node ID column needs to exist for these system functions to work. If none of these system functions is called, you do not need to specify a node ID column.

After you specify a node ID column, use the Insert Grid Buffer Row By Node ID system function to insert a row at any location, based on its node ID value and Insert As parameter. Use this method to permit an application to insert tree nodes at any position of the tree. Calling the Insert Grid Buffer Row By Node ID system function is the only way to add an entry row in the parent child control.

The parent child control provides some default bitmaps for tree nodes that are displayed to indicate the current status of that node (expanded, collapsed, and so forth). You can substitute your own bitmap to display for a node, however, with Set Tree Node Bitmap.

For each node, the parent child control can automatically generate and update hierarchical numbers called location indicators. If you enable the feature at design time, then users will see the location indicators button at runtime. By default, the numbering schema is 1, 1.1, 1.2, 1.3, 2, 2.1, and so on. You cannot modify the location indicator in any other way.

To insert an entry row in an empty parent child control, you must first call the system function, Set Root Node ID, to assign an ID to the hidden root node. By default, the root node in an empty tree is hidden, and therefore has no ID. After assigning an ID to the root node, then call the system function, Insert Grid Buffer Row By Node ID, and pass in the root node ID. If the control does not have a node ID column, runtime produces an error.


Add Action

Use this system function to add a context-based action to the parent child control in Product Sync mode.

Parameters

Parent/Child

Input, required. The parent child FC to affect.

Action Name

Input, required. The name of the action to add. Set the parameter to <Separator> or an applicable object from the object list.

Action ID

Input, required. The ID of the action to add. Set the parameter to <Separator> or an applicable object from the object list.

Parent Action ID

Input, required. Reserved for future functionality. Set to <Root Action>.

Icon

Input, required. The icon to display. Set the parameter to <Choose Action Bitmap>, <Default>, or <Separator>.

Additional Notes

If Action Name, Action ID, or Icon are specified as <Separator> then the entire action is a separator, and the values of the other parameters are to be ignored.


Attach Path To Segment

Use this system function to add a PSYNC path to a specific PSYNC segment or to all the segments in the PSYNC graph. It recursively adds all of the segments of a path to a given segment, facilitating reuse.

Parameters

Parent/Child

Input, required. The parent child FC to affect.

Product Synch ID

Input, required. The PSYNCH node to add the path. Set the parameter to < Currently Selected Row> or an applicable object from the object list.

Path ID

Input, required. The path to add to the segment. Set the parameter to an applicable object from the object list.

Error Code

Input, required. The object to which to assign the return value that indicates whether the function executed without error. Set the parameter to an applicable object from the object list.

Returns

This system function returns one of these values to the object identified by Error Code:

0

No error

1

Recursive

2

Other error


Change Row Selection

Use this system function to select or deselect a row in the grid or parent child control in Product Synch mode.

Parameters

Parent/Child

Input, required. The parent child FC to affect.

Row

Input, required. The row to affect. Set the parameter to <All Rows>, <Currently Selected Row>, or applicable object from the object list.

Select State

Input (EVDT_INT), required. The mode (such as Selected or Deselected) to which to set the row. Set the parameter to <Selected> (1), <Deselected> (0), or an applicable object from the object list.


Clear Grid Buffer

Use this system function to clear the GB manually.

Parameter

Parent/Child - Grid

Input, required. The parent child FC to affect.Copy Grid Row To Grid BufferUpdate Grid Buffer Row


Clear Grid Cell Error

Use this system function to clear an error on a cell, a tree node, a row, a column or the entire parent child control. Also, this system function does not take hidden rows into account; in other words, it affects the user grid instead of the model grid.

Parameters

Parent Child

Input, required. The parent child FC to affect.

Row

Input, required. The row in which to clear the error. Set the parameter to an alphanumeric constant (<Literal>), <All Rows>, or <Currently Selected Row>.

Column

Input, required. The column in which to clear the error. Set to <All Columns>.


Clear QBE Column

Use this system function to clear text from the QBE columns in the control.

Parameters

Parent Child

Input, required. The parent child FC to affect.

Column

Input, required. The QBE column to clear. Set to <All Columns>.


Contact Tree Node

Use this system function to collapse a tree node (for example, so that none of its children are displayed).

Parameters

Parent/Child

Input, required. The parent child FC to affect.

Node

Input, required. The target node to affect. Set the parameter to <Currently Selected Node>, <Last Inserted Node>, or <Currently Expanding/Collapsing Node>.


Copy Grid Row To Grid Buffer

Use this system function to write all of the GC fields to GB. Depending on the conditions when this function is initiated, the GC can be either in memory or in the grid.

Parameters

Parent/Child - Grid

Input, required. The parent child FC to affect.

Row

Input, required. The row to copy. Set the parameter to an alphanumeric constant (<Literal>), <Currently Selected Row>, <Currently Expanding/Collapsing Node>, or an applicable object from the object list.Clear Grid BufferUpdate Grid Buffer Row


Delete All Actions

Use this system function to remove all context-based actions from the specified parent child control in Product Synch mode.

Parameter

Parent/Child

Input, required. The parent child FC to affect.


Delete All Tree Nodes

Use this system function to delete all of the tree nodes (except for the hidden root) from a tree.

Parameter

Parent/Child

Input, required. The parent child FC to affect.


Delete Grid Row

Use this function to delete a grid row from the model grid. That is, you can use this system function to affect hidden rows.

Parameters

Parent/Child - Grid

Input, required. The parent child FC to affect.

Row

Input, required. The relative location to insert the row. Set the parameter to an alphanumeric constant (<Literal>), <All Rows>, <All Child Nodes Under the Current Node>, <Drag Node Row>, <Currently Selected Row>, or an applicable object from the object list.


Disable Grid

Use this system function to disable a cell, a tree node, a row, the column or the entire parent child control. This system function does not take hidden rows into account when deleting a row based on an absolute row number value.

Parameters

Parent Child

Input, required. The parent child FC to affect.

Row

Input, required. The row to be disabled. Set the parameter to an alphanumeric constant (<Literal>), <All Rows>, or <Currently Selected Row>.

Column

Input, required. The column to be disabled. Set to <All Columns>.Update Grid Buffer Row


Enable Grid

Use this system function to enable a grid cell, a tree node cell, a row, a column or the entire parent child control. This system function does not take hidden rows into account when deleting a row based on an absolute row number value.

Parameters

Parent Child

Input, required. The parent child FC to affect.

Row

Input, required. The row to be enabled. Set the parameter to an alphanumeric constant (<Literal>), <All Rows>, or <Currently Selected Row>.

Column

Input, required. The column to be enabled. Set to <All Columns>.Disable Grid


Expand Tree Node

This system function expands nodes at a given hierarchical level and lower and collapses the rest, all relative to a given node. Expanding a very large tree (for example, one with 1000 nodes or more) can cause a reduction in performance.

Parameters

Parent/Child

Input, required. The parent child FC to affect.

Node

Input, required. The target node to expand. Set the parameter to <Currently Selected Node>, <Last Inserted Node>, or <Currently Expanding/Collapsing Node>.


Get Grid Row

Use this function to target a grid row for use in an upcoming function in place of the grid row that would be used ordinarily.

Parameters

Parent/Child - Grid

Input, required. The parent child FC to affect.

Row

Input, required. The relative row to target. Set the parameter to an alphanumeric constant (<Literal>), <Blank>, <Zero>, or an applicable object from the object list.


Get Max Grid Rows

Use this system function to count the number of rows in the model grid; that is, it counts both hidden and visible rows.

Parameters

Parent/Child - Grid

Input, required. The parent child FC to affect.

Row

Input, required. The relative row to target. Set the parameter to an applicable object from the object list.


Get Next Selected Row

Use this system function to get the next selected row from a starting position in Product Synch mode. This applies to the display grid and not the model grid.

Parameters

Parent/Child

Input, required. The parent child FC to affect.

Start Row

Input, required. The row under which to find the next selected row. Typically, you pass <Before First Row> on the first row and then the value of the current row on subsequent calls. Set the parameter to <Before First Row> or an applicable object from the object list.

Selected Row

Output, required. The object to which to assign the value indicating the next selected row. Set the parameter to an applicable object from the object list.

Returns

This system function returns a value to the object identified by Selected Row. If no rows are selected after the start row, then the system function returns a value of –1.


Get Node ID

This system function returns the ID of a node at a given location. You can use this system function only if the control has a node ID column.

Parameters

Parent Child

Input, required. The parent child FC to affect.

Node Location

Input, required. The location of the node for which you want an ID. Set the parameter to <Root Node>, <Currently Selected Node>, <Last Inserted Node>, <Currently Expanding/Collapsing Node>, <Currently Deleted Node>, <Drag Over Node>, or an applicable object from the object list.

Node ID

Output, required. The object to which you want to assign the return value that designates the node ID. The value must be a variable or control with the same data type as the node ID column; a type mismatch will be checked by the runtime engine. Set the parameter to an applicable object from the object list.

Error Code

Output, required. The object to which you want to assign the return value that designates the error code for the transaction.

Returns

This system code returns two values. The node ID itself is returned to the object identified by Node ID. A value indicating whether the node was actually found is sent to the object identified by Error Code and can have one of two values:

0

The node ID was found successfully.

Nonzero value

The node ID was not found.Get Related Node IDInsert Grid Buffer Row By Node ID


Get Node Level

This system function returns the hierarchical level of a given node.

Parameters

Parent/Child

Input, required. The parent child FC to affect.

Node ID

Output, required. The object to which you want to assign the return value that designates the node ID. The value must be a variable or control with the same data type as the node ID column; a type mismatch will be checked the runtime engine. Set the parameter to <Currently Selected Node>, <Drag Over Node>, <Currently Expanding/Collapsing Node>, or <Currently Deleted Node>.

Return to

Output, required. The object to which you want to assign the return value that designates the node level. Set the parameter to an applicable object from object list.

Returns

This system function returns the hierarchical level of a given node to the object identified by Return to. If this system function fails (for example, the node ID does not exists), then the system function returns a value of –1.


Get Related Node ID

This system function returns the ID of a node related to a reference node.

Parameters

Parent Child

Input, required. The parent child FC to affect.

Current node ID

Input, required. The ID of node to use as a reference. Set the parameter to an applicable object from the object list.

Relation

Input, required. The relationship of the target node to the reference node. Set the parameter to <Parent Node>, <First Child Node>, <Next Sibling Node>, <Previous Sibling Node>.

Node ID

Output, required. The object to which you want to assign the return value that designates the node ID. The value must be a variable or control with the same data type as the node ID column; a type mismatch will be checked by the runtime engine. Set the parameter to an applicable object from the object list.

Error Code

Output, required. The object to which you want to assign the return value that designates the error code for the transaction. The value must be integer type variable or control. Set the parameter to an applicable object from the object list.

Returns

This system code returns two values. The node ID itself is returned to the object identified by Node ID. A value indicating whether the node was actually found is sent to the object identified by Error Code and can have one of two values:

0

The node ID was found successfully.

Nonzero value

The node ID was not found.


Get Row Number

This system function returns the row number of a given node. You can use this system function only if the control has a node ID column.

Parameters

Parent Child

Input, required. The parent child FC to affect.

Node ID

Input, required. The ID of the target node. Set the parameter to an applicable object from the object list.

Row Number

Output, required. The object to which you want to assign the return value that designates the row number.

Returns

This system function returns the next selected row number to the object identified by Row Number. If this system function fails (for example, the node ID does not exists), row number is –1.Get Node ID


Get Selected Context Action

Use this system function to get the action ID of the action that triggered the OnAction event. You cannot use this system function in any other event.

Parameters

Parent/Child

Input, required. The parent child FC to affect.

Action ID

Output, required. The object to which to assign the value that indicates the action ID of the action that triggered the OnAction event. Set the parameter to an applicable object from the object list.

Returns

This system function returns the ID of the action that triggered the OnAction event to the object specified by Action ID.


Get Selected Grid Row Count

Use this function to count the number of grid rows in a given range of rows (that is, in the current selection).

Parameters

Parent/Child - Grid

Input, required. The parent child FC to affect.

Row

Output, required. The object to which to assign the return value that designates the number of rows. Set the parameter to an applicable object from the object list.

Returns

This system function returns the number of rows in the current selection to the object specified by Row.


Get Selected Grid Row Number

Use this function to get the row number for a selected row. Typically, you use this function only when you need to save the row as a variable for future processing.

Parameters

Parent/Child - Grid

Input, required. The parent child FC to affect.

Row

Output, required. The object to which to assign the return value that designates the row number. Set the parameter to an applicable object from the object list.

Returns

This system function returns the row number for the selected row to the object specified by Row.


Get Tree Node Handle

Use this system function to return the handle of a target node.

Parameters

Parent/Child

Input, required. The parent child FC to affect.

Node

Input, optional. The ID of the node for which to get the handle. Leave this parameter blank if you want to identify the node by its position (Index parameter). Set the parameter to <Currently Selected Node>, <Last Inserted Node>, <Root Node>, <Currently Expanding/Collapsing Node>, or <Currently Deleted Node>.

Index

Input, optional. The position of the node for which to get the handle. Leave this parameter blank if you want to identify the node by its condition, such as currently selected, last insert, and so forth (Node parameter). Set the parameter to an alphanumeric constant (<Literal>), <Blank>, <Zero>, or an applicable object from the object list.

Handle

Output, required. The object to which to assign the return value that designates the handle of the target node (numeric). Set the parameter to an applicable object from the object list.

Returns

This system function returns the handle for a tree node to the object specified by Handle.


Hide Grid Column

Use this system function to hide the entire column.

Parameters

Parent/Child - Grid

Input, required. The parent child FC to affect.

Column

Input, required. The column to hide. Set this variable to <All Columns>.Get Node ID


Insert Grid Buffer Row

Use this system function to insert a row from the GB into the control. This system function does not take hidden rows into account.

Parameters

Parent/Child - Grid

Input, required. The parent child FC to affect.

Row

Input, required. The relative location where to insert the data. Set the parameter to an alphanumeric constant (<Literal>), <After Current Row>, <After Last Row>, <Under Currently Expanding Node>, <Under Drop Node>, <Under Drop Node as First Child>.

Selectable?

Input, required. An indicator of whether the user can select the inserted row. Set the parameter to <Yes> or <No>.

Protectable?

Input, required. An indicator of whether the user can edit the inserted row. Set the parameter to <Yes> or <No>.

Updateable?

Input, required. An indicator of whether runtime will attempt to update the underlying table if the user edits the data and clicks the OK button. Set the parameter to <Yes> or <No>.

Deleteable?

Input, required. An indicator of whether the user can delete the inserted row. Set the parameter to <Yes> or <No>.

Clear After?

Input, required. An indicator of whether runtime should clear the GB automatically immediately after the insert. Set the parameter to <Yes> or <No>.

Expandable?

Input, required. An indicator of whether the user can expand the inserted row. Set the parameter to <Yes> or <No>.Insert Grid Buffer Row By Node ID


Insert Grid Buffer Row By Node ID

Use this system function to insert a row from the GB into a location relative to another tree node.

Parameters

Parent Child

Input, required. The parent child FC to affect.

Base On Node ID

Input, required. The ID of the target node. Set the parameter to an applicable object from the object list.

Insert As

Input, required. The position to insert the GB row, relative to the target node. Set the parameter to insert the row immediately under the target node and make it a child of the target <First Child Node>, make the row a child of the target node and insert it at the bottom of the target's children <Last Child Node>, insert the row immediately after the target node <Next Sibling Node>, or insert the row immediately before the target node <Previous Sibling Node>.

Selectable

Input, required. An indicator of whether the user can select the inserted row. Set the parameter to <Yes> or <No>.

Protectable

Input, required. An indicator of whether the user can edit the inserted row. Set the parameter to <Yes> or <No>.

Updateable

Input, required. An indicator of whether runtime will attempt to update the underlying table if the user edits the data and clicks the OK button. Set the parameter to <Yes> or <No>.

Deleteable

Input, required. An indicator of whether the user can delete the inserted row. Set the parameter to <Yes> or <No>.

Clear After?

Input, required. An indicator of whether runtime should clear the GB automatically immediately after the insert. Set the parameter to <Yes> or <No>.

Expandable?

Input, required. An indicator of whether the user can expand the inserted row. Set the parameter to <Yes> or <No>.

Insert Mode

Input, required. An indicator of whether the new row is to be inserted into the database or to be updated into the database (assuming such a row already exist in the database), if the parent child control has a business view. If the insert mode is Update and no such row exists in the database, the system will fail to process this row. If the insert mode is Insert and a row already exists in the database, the system will fail to process the row in the database. Set the parameter to <Insert> or <Update>.

Additional Notes

You can insert the row before or after the target node. Alternatively, you can insert the row as a child of the target node. In that case, you can choose to insert it as the first or the last child.Insert Grid Buffer Row


Set Action

Use this system function to enable or disable a specific context-based action in Product Synch mode.

Parameters

Parent/Child

Input, required. The parent child FC to affect.

Action ID

Input, required. The ID of the action to enable or disable. Set the parameter to <Enabled>, <Disabled>, or an applicable object from the object list.

State

Input (EVDT_INT), required. An indicator of the state (enabled or disabled) of the action. Set the parameter to <Selected> (1), <Deselected> (0), or applicable object from the object list

Additional Notes

Note that State can be enabled, disabled, or you can pass in an EVDT_INT variable which will be interpreted to provide the value for the selection state. This makes it possible to reduce if/then logic because one system function can be used to update the enabled state for a context based action.


Set Data Dictionary Item

Use this system function to override form controls and grid columns that are data dictionary (DD) items. This is a complete change; you substitute a different DD item for the existing one. You can also create a new DD item that is not the same type as the old item.

Parameters

Parent/Child - Grid

Input, required. The parent child FC to affect.

Column

Input, optional. The column to hide. Because parent child controls have only one column, you do not need to enter a value into this parameter. Set to <All Columns>.

DD Alias

Input, required. The alias of the DD item that you want to use. Set the parameter to a specific DD alias (<Pick DD Item>) or an applicable object from the object list

System Code

Input, required. The system code to use when checking for textual overrides to apply to the DD item. Set to <default>.


Set Data Dictionary Overrides

Use this system function to change a specific DD item property.

Parameters

Parent/Child - Grid

Input, required. The parent child FC to affect.

Column

Input, optional. The column to hide. Because parent child controls have only one column, you do not need to enter a value into this parameter. Set to <All Columns>.

Overrides

Input, required. The override to apply. Set the parameter to the specific type of override to apply (<Data Dictionary Overrides>).


Set Drag Cursor

Use this system function to assign an image to the cursor when the user performs a drag operation.

Parameters

Parent/Child

Input, required. The parent child FC to affect.

Cursor

Input, required. The cursor to apply. Set the parameter to <Default> or <No Drag Cursor>.


Set Grid Cell Error

Use this system function to set an error on a cell, a tree node, a row, a column or the entire parent child control. This system function does not take hidden rows into account.

Parameters

Parent Child

Input, required. The parent child FC to affect.

Row

Input, required. The row on which to set the error. Set the parameter to an alphanumeric constant (<Literal>), <All Rows>, or <Currently Selected Row>.

Column

Input, required. The column on which to set the error. Set to <All Columns>.

Error Code

Input, required. The error to set. Set the parameter to an alphanumeric constant (<Literal>), <Blank>, <Zero>, or an applicable object from the object list


Set Grid Color

Use this system function to set a color on a cell, a tree node, a row, a column, or the entire control. You can select a specific color to set, or you can reset the color, which returns the color of the object to its default value. This system function does not take hidden rows into account.

Parameters

Parent/Child - Grid

Input, required. The parent child FC to affect.

Row

Input, required. The relative row on which to set the color. Set the parameter to an alphanumeric constant (<Literal>), <All Rows>, <Currently Selected Row>, applicable object from the object list.

Column

Input, required. The column on which to set the color. Set to <All Columns>.

Color

Input, required. The color to display. Set the parameter to a color from the color palette (<Pick Color>) or the default color <Reset Color>.


Set Grid Column Heading

Use this system function to change the text in a column heading.

Paramters

Parent/Child - Grid

Input, required. The parent child FC to affect.

Column

Input, required. The column for which to change the header. Set to <All Columns>.

Text

Input, required. The text to use for the column header. Set the parameter to alphanumeric constant (<Literal>), <Blank>, <Zero>, or applicable object from the object list.


Set Grid Font

Use this system function to set a font for the text in a cell, a tree node, a row, a column, or the entire control. Font in this context includes font type (such as Arial or Times New Roman), style (such as italic or bold), size, effects (strikeout or underline), and color. You can select a specific font to set, or you can reset the font which returns the font of the object to its default value. This system function does not take hidden rows into account.

Parameters

Parent/Child - Grid

Input, required. The parent child FC to affect.

Row

Input, required. The relative row for which to set the font. Set the parameter to an alphanumeric constant (<Literal>), <All Rows>, <Currently Selected Row>, applicable object from the object list.

Column

Input, required. The column on which to set the font. Set to <All Columns>.

Font

Input, required. The font to be set on the row and column. Set the parameter to a font and related settings from the Font dialog (<Pick Font>) or the default font <Reset Color>.Insert Grid Buffer Row


Set Grid Row Bitmap

Use this system function to manipulate the bitmap icon that appears next to the row. This function sets a specific system bitmap, such as a check mark or a trash can, to use as an icon on a specified row header. This system function does not take hidden rows into account.

Parameters

Parent/Child - Grid

Input, required. The parent child FC to affect.

Row

Input, required. The relative row for which to set the bitmap. Set the parameter to an alphanumeric constant (<Literal>), <All Rows>, <Currently Selected Row>, applicable object from the object list.

Bitmap

Input, required. The bitmap to be set on the row. Set the parameter to the specific bitmap that you want to apply (<Checkbox>, <X Mark>, and so forth).


Set QBE Column Compare Style

When the application performs a QBE search, this system function permits the application to set which comparison operator to use. For example, if you want to set up a date column QBE field to be > January 1, 2005, you would use QC WorkDate = "010105" and Set QBE Column Compare Style(FC Parent/Child, GC WorkDate, <Greater Than>).

Parameters

Parent Child

Input, required. The parent child FC to affect.

Column

Input, required. The column on which to set the QBE comparison operator. Set to <All Columns>.

Compare Style

Input, required. The comparison operator to use. Set the parameter to <Equal To>, <Not Equal To>, <Greater Than>, <Less Than>, <Greater Than or Equal To>, or <Less Than or Equal To>.


Set Tree Bitmap Scheme

Use this system function to assign bitmap icons to represent the different states that a tree node might be in (open/expanded, closed/collapsed, or leaf/no children).

Parameters

Parent/Child

Input, required. The parent child FC to affect.

Open Bitmap

Input, required. The icon to use when the node is in an expanded state; that is, all of its children are displayed. Set the parameter to <Choose Tree Bitmap> or <Default>.

Closed Bitmap

Input, required. The icon to use when the node is in a collapsed state; that is, all of its children are hidden. Set the parameter to <Choose Tree Bitmap> or <Default>.

Leaf Bitmap

Input, required. The icon to use when the node has no children and therefore cannot be expanded or collapsed. Set the parameter to <Choose Tree Bitmap> or <Default>.


Set Tree Node Bitmap

This system function replaces the default bitmap for a node with one of your choosing.

Parameters

Parent/Child

Input, required. The parent child FC to affect.

Node

Input, required. The node or row for which to replace the bitmap. This value cannot be 0. Set the parameter to <Currently Selected Node>, <Last Inserted Node>, <Currently Expanding/Collapsing Node>.

Bitmap

Input, required. The bitmap image to display. Set the parameter to <Choose Tree Bitmap> or <None>.

Overlay?

Input, required. A flag that indicates whether to superimpose the image on the base bitmap image. Overlays are displayed on Windows clients only. Set the parameter to <Yes> or <No>.Set Tree Node Clickable Bitmap


Set Tree Node Bold

This system function sets the text associated with a tree node in bold type face.

Parameters

Parent/Child

Input, required. The parent child FC to affect.

Node

Input, required. The tree node to affect. Set the parameter to <Currently Selected Node>, <Last Inserted Node>, <Currently Expanding/Collapsing Node>.

Bold

Input, required. A flag that indicates whether to apply or remove bold type face formatting to the text of the indicated node. Set the parameter to <Yes> or <No>.


Set Tree Node Clickable Bitmap

This system function displays an additional node bitmap to the specified tree node or row. The bitmap is clickable (clicking the bitmap causes the event to fire: Tree Node Bitmap Is Clicked). The additional bitmap appears to the left of the regular bitmap, so after this system function is called, the tree node has two bitmaps.

Parameters

Parent/Child

Input, required. The parent child FC to affect.

Node

Input, required. The node or row to which to add the clickable bitmap. This value cannot be 0. Set the parameter to <Current Selected Node>, <Last Inserted Node>, or an applicable object from the object list

Bitmap

Input, required. The bitmap image to display. Set the parameter to <Choose Tree Bitmap> or <None>.Set Tree Node Bitmap


Set Tree Node Handle

Use this system function to set the handle of a target node.

Parameters

Parent/Child

Input, required. The parent child FC to affect.

Node

Input, optional. The ID of the node for which to get the handle. Leave this parameter blank if you want to identify the node by its position (Index parameter). Set the parameter to <Current Selected Node>, <Last Inserted Node>, <Root Node>, or <Currently Expanding/Collapsing Node>.

Index

Input, optional. The position of the node for which to get the handle. Leave this parameter blank if you want to identify the node by its condition, such as currently selected, last insert, and so forth (Node parameter). Set the parameter to an alphanumeric constant (<Literal>), <Blank>, <Zero>, or an applicable object from the object list

Handle

Input, required. The value to use for the handle for the target node. Set the parameter to an applicable object from the object list.


Set Tree Root Node ID

This system function assigns a node ID value to the hidden root node. You can use this system function only if the control has a node ID column.

Parameters

Parent Child

Input, required. The parent child FC to affect.

Node ID

Input, required. A variable/control with compatible data type (same type as the node ID column) that holds a value. A type mismatch will be checked by the runtime engine. Set the parameter to an applicable object from the object list.


Show Grid Column

Use this function to show the entire column.

Parameters

Parent/Child - Grid

Input, required. The parent child FC to affect.

Column

Input, required. The column to show. Set to <All Columns>.Hide Grid Column


Show N Levels

Use this system function to expand or collapse a tree branch or the entire tree to a uniform hierarchical level.

Parameters

Parent Child

Input, required. The parent child FC to affect.

Node/Row

Input, required. The ID of the node or row under which you want to affect. Select <Root Node> if you want to affect the entire tree. Set the parameter to <Root Node> or an applicable object from the object list.

Level

Input, required. The hierarchical level to which to expand or collapse the target node or row's children. Set the parameter to an applicable object from the object list.


Suppress Fetch On Node Expand

Whenever a node is expanded, the system function, Suppress Fetch on Node Expand, is called from the event, Tree Node Is Expanded. This function tells the runtime engine not to do any fetches because ER will handle the loading of the child nodes.

Parameter

Parent Child

Input, required. The parent child FC to affect.


Suppress Grid Line

Use this function to prevent a row from becoming part of the grid. For example, use this system function on the Write Grid Line Before event to prevent the line from being written to the grid.

Parameter

Parent/Child - Grid

Input, required. The parent child FC to affect.


Suppress Node Indent/Outdent

This system function prevents users from being able to move nodes horizontally within the tree structure.

Parameter

Parent Child

Input, required. The parent child FC to affect.Suppress Node Move Up/Down


Suppress Node Move Up/Down

This system function prevents users from being able to move nodes vertically within the tree structure.

Parameter

Parent Child

Input, required. The parent child FC to affect.Suppress Node Indent/Outdent


Update Grid Buffer Row

Use this system function to update a row from the GB into the grid control. This system function does not take hidden rows into account.

Parameters

Parent/Child - Grid

Input, required. The parent child FC to affect.

Row

Input, required. The relative row to affect. Set the parameter to an alphanumeric constant (<Literal>), <Currently Selected Row>, <Currently Expanding/Collapsing Node>, or an applicable object from the object list.

Selectable?

Input, required. An indicator of whether the user can select the updated row. Set the parameter to <Yes> or <No>.

Protected?

Input, required. An indicator of whether the user can edit the updated row. Set the parameter to <Yes> or <No>.

Updateable?

Input, required. An indicator of whether runtime will attempt to update the underlying table if the user edits the data and clicks the OK button. Set the parameter to <Yes> or <No>.

Deleteable?

Input, required. An indicator of whether the user can delete the updated row. Set the parameter to <Yes> or <No>.

Clear After?

Input, required. An indicator of whether runtime should clear the GB automatically immediately after the update. Set the parameter to <Yes> or <No>.


Was Grid Cell Value Entered

This system function returns a nonzero value if a specific grid cell or tree node has been changed since last time this system function is called.

Parameters

Parent Child

Input, required. The parent child FC to affect.

Column

Input, required. The column containing the grid cell to check. Set to <All Columns>.

Return To

Input, required. The object to which to assign the return value that designates whether the cell or node has changed. Set the parameter to an applicable object from the object list.