Skip to content Skip to footer

Form Script Commands

Sr#CommandsReturn TypeExampleDescriptionAndroidiOSWeb
1getWidgetValue(String identifier)voidTo retrieve widget’s current value using identifierYesYesYes
2isWidgetVisible(String identifier)voidTo check widget is visible using identifierYesNoYes
3getWidgetPrompt(String identifier)voidTo retrieve widgets current visible promptYesNoYes
4getWidgetResourcePrompt(String identifier)voidTo retrieve widgets regex contained promptYesNoYes
5String getCurrentFormId()Stringto get form id. return in string formatYesNoYes
6String getCurrentFormObjectId()StringTo get current form object id. return in string formatYesNoYes
7String getFormObjectWidgetValue(String FOID,String identifier)StringTo get value of other form object’s widget valueYesNoNo
8setWidgetValue(String identifier, String Value)“used to set widgets value or updates widgets value
reloadUICell() or reloadUICells should be called after this event to update widgets view.”
YesNoYes
9setWidgetPrompt(String identifier, String prompt)“form script updates widgets prompt
reloadUICell() or reloadUICells should be called after this event to update widgets view.”
YesNoYes
10setWidgetVisibility(String identifier, boolean visible)“set widgets visibility. in form of boolean true or false
reloadUICell() or reloadUICells should be called after this event to update widgets view.”
YesNoYes
11setWidgetValidity(String identifier, boolean valid, String message)Not Implemented
12setWidgetChoices(String identifier, String choicesJSON)“Used to set source choices of choice widget. It works only on choice, date time, barcode and text widget
reloadUICell() or reloadUICells should be called after this event to update widgets view.”
YesNoNo
13setWidgetValue(String jsonWithIdentifier)[{“i”:”identifier”,”v”:””},{“i”:”identifier2″,”v”:””}]“to set bulk values for list of widgets as per below example
the setter parameter is in stringify json format
reloadUICell() or reloadUICells should be called after this event to update widgets view.”
YesNoNo
14setWidgetPrompt(String jsonWithIdentifier)[{“i”:”identifier”,”v”:”prompt1″},{“i”:”identifier2″,”v”:”prompt2″}]“to set bulk prompts for list of widgets as per below example
the setter parameter is in stringify json format
reloadUICell() or reloadUICells should be called after this event to update widgets view.”
YesNoNo
15setWidgetVisibility(String jsonWithVisibility)[{“i”:”identifier”,”v”:true},{“i”:”identifier2″,”v”:true}]“to set bulk visibility for list of widgets as per below example
the setter parameter is in stringify json format
reloadUICell() or reloadUICells should be called after this event to update widgets view.”
YesNoNo
16applyGeoFence(String identifier)Not implemented
17setWidgetDisplayMode(String identifier, String displayMode)displayMode= editable/readonly“Used to set widget’s display mode either editable or readonly
reloadUICell() or reloadUICells should be called after this event to update widgets view.”
YesNoNo
18setGeneralWarning(String warningJson){“t”:”title”,”m”:”message”}“During submission process show warning before submission.
It add option to submit the form.”
YesNoNo
19setGeneralError(String errorJson){“t”:”title”,”m”:”message”, “pt”:”regex”}“After submission if implemented component wants to show error before submission.
It don’t allow to submit the form.”
YesYesNo
20showAlert(String json){“t”:”title”,”m”:”message”}Shows error pop up using provided json dataYesNoYes
21closeForm(String errorJson){“t”:”title”,”m”:”message”}It shows error like setGeneralError and deletes the form objectYesYesYes
22on_load()To load the changes onload of formYesYesYes
23on_submit()To put changes on submit of formYesYesYes

API service

Sr#CommandsReturn TypeExampleDescriptionAndroidiOSWeb
1callAPI(String APIName, String ParameterJSON, String fileJSONArray, String successEvent, String errorEvent)“Call API to server used to call dynamic API call using implemented component.
– have ability to provide parameter in JSON format and files in multipart HTTP call
– Output of success or failure will be send on successEvent and errorEvent”.
YesNoNo
2onAPISuccess(String event, String response)Used to trigger API success event that callAPI event specified with API response.YesNoNo
3onAPIError(String event, String response)Used to trigger API error event that callAPI event specified with API response.YesNoNo

Activity/UI Service

Sr#CommandsReturn TypeExampleDescriptionAndroidiOSWeb
1reloadUICell(String identifier)“used to update view once it is updated by implemented component. The view will not get updated by itself in
setWidgetVisibility, setWidgetValue, setWidgetPrompt, setWidgetDisplayMode events”
YesNoYes
2reloadUICells(String[] identifier)“used to update widget views once it is updated by implemented component. The view will not get updated by itself in
setWidgetVisibility, setWidgetValue, setWidgetPrompt, setWidgetDisplayMode events”
YesNoYes

Was This Article Helpful?

0
0 Comments

There are no comments yet

Leave a comment

Your email address will not be published. Required fields are marked *

Close Bitnami banner
Bitnami