Chapter Contents |
Previous |
Next |
Organizational Chart: _getChildren |
Syntax | |
Details | |
Example |
Syntax |
CALL NOTIFY (orgchart-name, '_getChildren', node-id, list-of-names, list-id<, all-levels>); |
Argument | Type | Description | |
---|---|---|---|
node-id |
N | specifies the numeric identifier of the node | |
list-of-names |
C | specifies a single, quoted text string containing the names of the
node variables whose values are to be returned in list-id. Separate
multiple node variable names with a space. Specify
' ALL
'
to return the value of all variables. You can include these options in the
string: |
|
/F | return the number of direct children. If both /F and all-levels are specified, all-levels is ignored. | ||
/R | return lists in reverse order. | ||
list-id |
N | returns the identifier of an SCL list containing a sublist for each
child of the specified node. The length of the list is the number of children
the specified node has. Each sublist contains the values requested in list-of-names for the child node. If list-of-names is
' /F
' , then list-id returns the actual
number of child nodes instead of a list identifier. |
|
all-levels |
C | specifies whether to return all levels of node children: | |
'N' | only direct children (the default) | ||
'Y' | all levels of children |
Details |
Although the method automatically creates list-id if its value is missing or 0, you must delete it with the DELLIST function after you have finished with it.
Example |
This example retrieves the displayed text, character value, identification number assigned by the user, and observation number of each direct child of the selected node and stores it in OUTLIST.
This code must be in a labeled section of the SCL program associated with the frame. The labeled section can be either the organizational chart's labeled section (in this case the section labeled ORG1), or a labeled section specified in the Select Action window:
ORG1: /* Get the identifiers of the organizational chart object */ /* and of the selected node */ call notify ('org1', '_get_selected_', widgetid, nodeid); if (nodeid eq 0) then return; /* Specify the items whose values you want to retrieve */ buff='text cvalue id obs'; /* Get the values from the child nodes and return them in OUTLIST*/ call notify ('org1', '_get_children_', nodeid, buff, outlist); return;
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.