GenDynABNElement
Mon 01 January 2018Syntax
GenDynABNElement(&str_param1[,&str_param2], ...)
Description
Note: SmartNavigation has been deprecated. This function remains for backward compatibility only.
Use the GenDynABNElement function to generate <li> elements for the specified data source to be used as a dynamically generated SmartNavigation subfolder. This built-in function is required when the root SmartNavigation folder is designated as a âdynamic hierarchyâ folder on the Folder Administration page.
The <li> elements generated by this function can be provided as the input to the GenHTMLMenu function. Alternatively, the output of one invocation of GenDynABNElement can be concatenated to subsequent invocations prior to calling the GenHTMLMenu function.
Parameters
Field or Control |
Definition |
---|---|
&str_param1, &str_param2, ... |
Specifies the first and additional input parameters to the function as string variables. |
Note: Each string parameter can be specified as a string literal or a string variable.
While this function can accept an unlimited number of string parameters, in practical terms, the function expects a specific number of string parameters in a specific order depending on whether the data source for the dynamically generated SmartNavigation subfolder is a tree or a rowset.
When the data source for the SmartNavigation subfolder is a tree, 11 string parameters are required in the following order with the following specifications:
-
Data source type â For a tree, this parameter must be "t".
-
Display as CREF â Indicates that the SmartNavigation folder is to be displayed as a CREF, which immediately displays the SmartNavigation chart, instead of as a folder with submenus. Specify as false = "f"; true = "t".
-
Folder ID â Specifies a programmatically generated folder ID. For example: "PRS_DATA_001".
-
Folder label â Specifies the label to display for this subfolder in the SmartNavigation menu drop-downs, fly-outs, and breadcrumbs. For example: "Personnel Data".
-
Chart component â Specifies the page used to render the SmartNavigation chart in the following format: COMPONENT.PAGE.MKT.
-
PeopleCode ID â Specifies the PeopleCode program to run to generate the SmartNavigation elements for the specified data source. The PeopleCode ID must be in the following format: APP_PKG.Class.Method.
-
Tree name â Specifies the name for the tree. For example: "PERS_DATA".
-
Tree setID â Specifies the setID for the tree. For example: "SHARE".
-
Tree user key â Specifies the user key value for the tree (also known as the set control value). An actual value is optional but must be specified as the null string: "".
-
Tree effective date â Specifies the effective date for the tree. An actual value is optional but must be specified as the null string: "".
-
Tree branch â Specifies the tree branch. An actual value is optional but must be specified as the null string: "".
SmartNavigation passes the values of several tree-specific fields to the application via URL. Certain characters are inappropriate for use in a URL and must be avoided. When using a tree as a SmartNavigation data source, do not use any of the following characters in the tree name, setID, user key value, and tree branch values:
pound (#) |
percent (%) |
dollar ($) |
ampersand (&) |
plus (+) |
comma (,) |
forward slash/virgule (/) |
colon (:) |
semi-colon (;) |
equals (=) |
question mark (?) |
at symbol (@) |
space ( ) |
quotation marks(") |
less than symbol (<) |
greater than symbol (>) |
left curly brace ({) |
right curly brace (}) |
vertical bar/pipe (|) |
backslash (\) |
caret (^) |
tilde (~) |
left square bracket ([) |
right square bracket (]) |
grave accent (`) |
For example:
rem Create SmartNavigation dynamic folder from a tree;
&fldr = GenDynABNElement(&ds_t, &cref_t, &fldr_id, &label_t, &chart_t, &pcode_t, â
&tree_name, &tree_setid, &tree_userkey, &tree_effdt, &tree_branch);
When the data source for the SmartNavigation subfolder is a rowset, 6 string parameters are required in the following order with the following specifications:
-
Data source type â For a rowset, this parameter must be "r".
-
Display as CREF â Indicates that the SmartNavigation folder is to be displayed as a CREF, which immediately displays the SmartNavigation chart, instead of as a folder with submenus. Specify as false = "f"; true = "t".
-
Folder ID â Specifies a programmatically generated folder ID. For example: "PRS_DATA_001".
-
Folder label â Specifies the label to display for this subfolder in the SmartNavigation menu drop-downs, fly-outs, and breadcrumbs. For example: "Personnel Data".
-
Chart component â Specifies the page used to render the SmartNavigation chart in the following format: COMPONENT.PAGE.MKT.
-
PeopleCode ID â Specifies the PeopleCode program to run to generate the SmartNavigation elements for the specified data source. The PeopleCode ID must be in the following format: APP_PKG.Class.Method.
For example:
rem Create SmartNavigation dynamic folder from a rowset;
&fldr = GenDynABNElement(&ds_r, &cref_r, &fldr_id, &label_r, &chart_r, &pcode_r);
Returns
A string representing the <li> elements for the data source.