Availability
This routine is available since katl-commons 2.5.19 / 2.6.11.
Syntax:
admAddFieldToScreen(scrName, fieldAsStr)
or
admAddFieldToScreen(scrName, fieldAsStr, scrTabName)
or
admAddFieldToScreen(scrName, fieldAsStr, scrTabName, indexInTab)
Description:
Adds a field(custom field or system field) to a screen.Parameters:
Parameter name | Type | Required | Description |
---|---|---|---|
scrName | string | yes | The screen name |
fieldAsStr | string | yes | The field as a string(the field id for system fields, the field id as string, the field name or alias for custom fields) |
scrTabName | string | no | The tab name(if not provided, the first tab will be used to add the field) |
indexInTab | number | no | The position in tab(if not provided, or -1, the field will be the last in the tab) |
Return type:
string
Returns true if the field is successfully added to the screen, false otherwise.
The method throws an exception if the screen name or field parameters are empty or don't refer to a valid screen/field. Also an exception is thrown if the field is already present in the screen.
If the tab name is provided and a tab with this name does't exist in the screen, it will be created and added as the last tab in the screen.
Example:
Example 1:
Adding a system field to a screen, in the first tab, default(last position) in tab:
admAddFieldToScreen("TestScreen", "priority");
Example 2:
Adding a system field to a screen, in the tab "TestTab", first position in tab:
admAddFieldToScreen("TestScreen", "priority", "TestTab", 0);
Example 3:
Adding a custom field to a screen, in the tab "TestTab", default(last) position in tab:
admAddFieldToScreen("TestScreen", "customfield_10000", "TestTab");
See Also:
-
-
-
-
admGetFieldConfigurationScheme (Simple Issue Language™)
-
admSetProjectWorkflowScheme (Simple Issue Language™)
-
-
admSetFieldConfigurationScheme (Simple Issue Language™)
-
-
-
-
admGetProjectWorkflowScheme (Simple Issue Language™)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-