GetSetId
Mon 01 January 2018Syntax
GetSetId({FIELD.fieldname | text_fieldname}, set_ctrl_fieldvalue, {RECORD.recname | text_recname}, treename)
Description
Use the GetSetId function to return a string containing a setID based on a set control field (usually BUSINESS_UNIT), a set control value, and one of the following:
-
The name of a control table (or view) belonging to a record group in the TableSet Control controlled by the set control value.
-
The name of a tree in the TableSet Control controlled by the set control value.
If you want to pass a control record name to the function, you must pass an empty string in the treename parameter. Conversely, if you want to pass a tree name, you must pass an empty string in the text_recname parameter. In practice, tree names are rarely used in this function.
Note: This function does not validate the parameters passed to it. It is up to your application to ensure that only valid data is used. If an invalid value is used, the defined default value is used.
Parameters
Field or Control |
Definition |
---|---|
fieldname |
Specify the set control field name as a FIELD reference. Use this parameter (recommended) or the text_fieldname parameter. |
text_fieldname |
Specify the name of the set control field as a string. Use this parameter or the fieldname parameter. |
set_ctrl_fieldvalue |
Specify the value of the set control field as a string. |
recname |
Specify as a RECORD reference the name of the control record belonging to the record group for which you want to obtain the setID corresponding to the set control value. Use this parameter (recommended) or the text_recname parameter. |
text_recname |
Specify as a string the name of the control record belonging to the record group for which you want to obtain the setID corresponding to the set control field value. Use this parameter or the recname parameter. |
treename |
Specify as a string the name of the tree for which you want to obtain the setID corresponding to the set control field value. |
Returns
GetSetId returns a five-character setID string.