Cprime Apps has been rebranded as Anova Apps. Please note the only effect is the company name - all of our products’ names, logos, functionalities, support, etc. is exactly the same. The new location to our documentation space is https://anovaapps.atlassian.net.
This routine is available starting with SIL Engine™ 2.5.19 / 2.6.11.
admAddFieldToScreen(scrName, fieldAsStr, scrTabName)
admAddFieldToScreen(scrName, fieldAsStr, scrTabName, indexInTab)
DescriptionAdds a field(custom field or system field) to a screen.
|fieldAsStr||string||yes||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||Tab name(if not provided, the first tab will be used to add the field).|
|indexInTab||number||no||Position in tab(if not provided, or -1, the field will be the last in the tab).|
Returns 'true' if the field is successfully added to the screen and '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 presented 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.
Adding a system field to a screen, in the first tab, default(last position) in tab:
Adding a system field to a screen, in the tab "TestTab", first position in tab:
Adding a custom field to a screen, in the tab "TestTab", default(last) position in tab:
There is no content with the specified labels