Skip to main content

General

Properties | Events | Methods

All the common Properties, Methods and events against the components which will be applicable globally will be shown here.

Properties

1. Primary

Id 'id' string

A unique identifier assigned to the input text box.

Name 'name' string

The name of the control which used for referencing in scripts or configurations.

Caption'caption' string

The label or text displayed alongside the input field.

2. Appearance

Disabled 'disabled' boolean

Disables the control's input so it cannot be interacted with.

Hide 'ishide' boolean

Hides the input field from view.

Mobile span 'mobilespan' number

Column span of the specific control on mobile devices.

Place holder 'placeholder' string

Hint text displayed inside the specific field when empty.

Custom Style 'customstyle' string

Additional CSS styles for the control.

Style

FieldGroupTypeDescription
StyleCustomJSONIt is used for CSS styling. Ex: {"customcolor":true,"oncolor":"#29ba50","offcolor":"#29ba50","textcolor":"#29ba50"}
customcolorstyleStringCustomColor should be true if color is required during ON/OFF.
oncolorstyleStringTo set the color when turning ON, use oncolor.
offcolorstyleStringTo set the color when turning OFF, use offcolor.
textcolorstyleStringTo set the color of the text.

3. Data

Value 'value' string

Contains user input values

Default value 'defaultvalue' string

Initial value for the input when the form loads.

Bind Field 'bindfield' String

Connects the control to a specific data field to display or update its value.

URL or path to fetch data dynamically for the input.

Data Source 'datasource' string

It defines the database, table, API, or dataset from which data is fetched.

Required 'required' boolean

Specifies whether the input is mandatory.

4. Others

Exclude Clone 'exclude clone' boolean

Disable Clone functionality.

Language 'langinfo' string

User can select the language as English/Arabic/Tamil. Also can update the caption (Control) and Tooltip (Additional info) in desired language.

Help document 'helpdoc' string

Link or reference to a help document.

Edit Mode Handler 'edtmdhandler' function

Handles logic when the input enters edit mode.


Events

These events are essential for building responsive, dynamic user interfaces.

EventTrigger MomentPurpose / Real-Time Usage
OnChangeWhen input value newly adds or changesAuto-update related fields (e.g., selecting Country loads States).
OnKeyDownWhen a key is pressed downTrigger search on Enter, apply shortcuts, scroll actions.
OnAfterDataImportAfter data import is completedShow success message or refresh imported data.
OnLostFocusWhen an element loses focusValidate input or auto-format when user leaves the field.
OnSelectedWhen an element (row/tab/item) is selectedLoad selected item details or update UI based on selection.
OnBeforeDeleteWhen delete action is initiatedShow confirmation popup or validate delete rules.
OnAfterDeleteAfter delete completesRefresh table and show “Record deleted” message.
OnBeforeAddWhen add action is initiatedCheck mandatory data or load defaults before opening form.
OnAfterAddAfter a new record is addedReload data table and show success message.
OnBeforeEditWhen edit action is initiatedCheck permissions or load existing record into form.
OnAfterEditAfter edit is completedRefresh list and show “Updated successfully.”
OnAfterLoadAfter data/page finishes loadingApply default filters or run initialization logic.
OnRowClickWhen a row is clickedDisplay row details or open a detailed side panel.
DeSelectedWhen a selected item is clicked againClear selection and reset related UI states.
OnOkClickWhen OK button in popup is clickedConfirm action, close popup, and proceed with next steps.
OnClickWhen a UI element is clickedSubmit forms, call APIs, open popups, or change properties.
OnDoubleClickWhen an element is double-clickedOpen detail view or perform quick-access actions.
OnFocusWhen an element gains focusHighlight field, show hint, or prepare input validations.
OnLoadWhen form or page finishes loadingInitialize fields, load defaults, or fetch required data.
OnPopupCloseWhen popup is closedRefresh parent form, reload lists, or run post-actions.

Methods

GetCtrlProperty function

Retrieves the specified property value from a control using its Control ID.

Default Variant

Return Type
string | number | boolean | Date | Time| Date and Time | json |

(The return type depends on the property being accessed.)

Syntax

let <Variable Name> = GetCtrlProperty("<Control ID>", "<Property>");

Example:
let userid = GetCtrlProperty("56", "value");

Parameters

Control ID string - The unique control id

Property string - Respective control property to get the value

Variant 1

Get Data Source Column Values

Return Type
string | number | boolean | Date | Time| Date and Time | json |

Syntax

let <<Variable Name>> = GetCtrlProperty("<<Contorl ID>>", "<<Data Source Field Name>>");

Example:
let ldvalue = GetCtrlProperty("11", "patientid");

SetCtrlProperty function

Set the value for the property of the control in the CRUD page.

Default Variant

Return Type
N/A

Syntax

SetCtrlProperty("<<Control ID>>", "<<Property>>", "<<Value>>");

Example:
SetCtrlProperty(12, 'disabled', true);

Parameters

Control ID string : Mention the unique Control id.

Property string : Mention the Control's Property.

Value string number boolean : Mention the value that is set to the control property.

Variant 1

Pass value to Data Table column parameter

Syntax

SetCtrlProperty("<<Data Table Control ID>>", "i:<<Data Source Field Name>>:<<Column Order No.>>:<<Parameter Name>>", "<<Control ID>>");

Example :
SetCtrlProperty(15, "i:columns:2:pnvendor", "i:4");

Parameters

i : Data Source Column Index

Data Source Field Name string : Columns

Column Order No number : Mention Column Order Number

Parameter Name string : Mention the column's parameter name

Variant 2

Set Sourcelink for Data Table

Syntax

SetCtrlProperty("<<Data Table Control ID>>", "<<SourceLink>>:<<ParameterName>>", "<<Value>>");

Example:
SetCtrlProperty(15, "sourcelink:pnvendor", "i:4");

Parameters

Parameter Name string : Mention the parameter name used in source link property

Value string boolean number : The value that is set for the mentioned parameter

Variant 3

Refresh Tile view control with value

Syntax

SetCtrlProperty("<<Control ID>>", "<<Property>>", { "<<Parameter Name>>": <<Parameter Value>> });

Example:
SetCtrlProperty("78", "refresh", { "pntype": 10 });

Parameter

Parameter Name string : Parameter name mentioned in datasource

Parameter Value string boolean number : The value that is set for the mentioned parameter


Show Alert Method

Show Alert Message as Toast pop-up

Return Type
N/A

Syntax

showAlert('<<Alert Message>>');

Example:
showAlert('Invalid MRN No.! Please verify the number and try again.');

Parameter
Alert Message string - Success / Warning / Error / Info / Processing / Loading


Show Alert Dialog function

Show Alert Message as a Dialog

Return Type
N/A

Syntax

ShowAlertDialog("Type", "<<Message>>");

Example:
ShowAlertDialog("warning", "Please Fill the Required Field");

Parameter

Type string required - Dialog type Identifier ( Success / Warning / Error / Info / Processing / Loading)

Message string/ array required - Alert message to be displayed

Variant 1

Based on the action, the success or failure method will be executed.

Return Type
N/A

Syntax

ShowAlertDialog("Type", "Message", "AcceptFunction", "RejectFunction")

Example:
showAlertDialog("confirm", "Want to proceed?", msg);

Parameter

Type string : Dialog type identifier

Message string/ array : Content to display in dialog

AcceptFunction string : Optional Callback for positive action (OK/Yes/Delete)

RejectFunction string : Optional Callback for negative action (Cancel/No)

*Note : Alert Type - Success / Delete / Warning / Error / Info / Processing / Loading / Saveasvalid


SetGlobalVariable process

Assign values to a global variable for access throughout the application.

Default Variant

Return Type
string | number | boolean | Date |

Syntax

SetGlobalVariable("<<Global Variable Name>>","<<Value>>");

Example:
SetGlobalVariable("name-4","MRN001");

Parameters

Global Variable Name string : The variable in which the value is stored.

Value string number boolean : The value of the global variable, which may come either directly or from UI controls


GetGlobalVariable process

Retrieve values from a globally stored variable.

Default Variant

Return Type

Property Data Type (based on the variable data type) string | number | boolean | Date |

Syntax

GetGlobalVariable("<<Global Variable Name>>");

Example:
let mrnno = GetGlobalVariable(name-4);

Parameters

Global Variable Name string : The variable in which the value is stored.


GeoLocation Method

To retrieve the user's latitude and longitude using their device's location services

Return Type
Object

Syntax

const [Function Name] = async() => {
let [Variable Name] = await GeoLocation()
}

[Function Name]()

Example:
const func = async() => {
let loc = await GeoLocation()
}

func()

*Note :The correct way to execute geolocation is using 'await' inside an 'async' function.


GetDate Process

Returns a 'Date object' containing either the current server date and time or a specified date and time.

Return Type
Date Time

Syntax

GetDate()

Example:
GetDate()
Variant 1

To get Date object using date Date value.

Return Type
Date Time

Syntax

GetDate(<<Date>>)


Example:
GetDate("2025-05-01")

Parameters

Date string : contains the date inside the string

Variant 2

To get Date object using Date Time value.

Return Type
Date Time

Syntax

GetDate(<<Date Time>>)

Example:
GetDate("2025-12-15 16:05:35'")

Parameters

Date Time string - contains Date with Time .


RefreshPage function

Used to refresh or reload a specific task, screen, or report in the application

Return Type
N/A

Syntax

RefreshPage(<<Page ID>>);

Example:
RefreshPage(2910209);

Parameters

pnid string number : Unique identifier of the page/task/report that needs to be refreshed.


RefreshParentPage function

Used to refresh the previous Page/Report data source in the design.

Return Type
N/A

Syntax

RefreshParentPage({"parent":"<<Parent Object ID>>","child":"<<Child Object ID>>"});

Example:
RefreshParentPage({"parent":"2251141","child":"2251122"});

Parameters

loparent JSON : Refresh the parent object

Parent(Previous) Design Serial No./ID string : Parent Object ID (Belongs to: loparent)

Current Design Serial No./ID string : Child Object ID ( Belongs to: loparent)


ShowHelpDocument function

Displays the relevant help document associated with a specific control, entry or functionality in the application.

Default Variant

Return Type
N/A

Syntax

ShowHelpDocument({helpdoc:"<<Help Document Code>>"})

Example:
ShowHelpDocument({helpdoc:"HI-3"})

Parameters

Help Document Code : This will open the help popup associated with the help document code (For eg: "HI-3") displaying relevant guidance or instructions for the linked control or feature.

The user can pass the respective code from the Help code Document page.


OpenPage Process

Used to open screens, tasks, reports, dashboards, or timelines dynamically using a configuration object. It supports workflows, screen modes (add/edit/view), conditional toolbars, drilldowns, and can open pages in iframes or new tabs.

Default Variant

Return Type
N/A

Syntax

OpenPage({
wfrefno: "",
wfprocno: "",
linkid: "", //Required
mode: "",
type: "", //Required
processid: "",
height: 768,
width: 800,
toolbarvisible: true,
footerclose: true,
appslno: 101,
menuname: "",
isviewonly: false,
srcdefvalues: {
empcode: "",
status: ""
},
cmnuid: "",
drilldownparam: {
date: ""
}
});


Example:
OpenPage(
{
"wfrefno":"",
"wfprocno":"",
"linkid":"3430035",
"mode":"add",
"type":"screen",
"processid":"",
"height":768,
"width":800,
"toolbarvisible" : false
}
)

Parameters

PropertyTypeDescription
wfrefnostring(Optional) Workflow reference number
wfprocnostring(Optional) Workflow process number
linkidnumber string(Required) Unique identifier of the screen, task, or report to open.
modestring(Optional) Operation mode – "add", "edit", or "view".
typestring(Required) Type of module to open – "screen", "task", "report", "dashboard", "timeline", or "task history".
processidstring(Optional) Business process ID
heightnumber(Optional) Custom height of the screen
widthnumber(Optional) Custom width of the screen
toolbarvisibleboolean(Optional) Set to false to hide the toolbar. Default is true.
footercloseboolean(Optional) Set to false to disable the footer’s auto-close feature
appslnonumber(Optional) Application ID. If not provided, it's pulled from local storage.
drilldownparamobject(Optional) Parameters used in drilldown views
cmnuidstring(Optional) Common UID to trigger iframe/external app
srcdefvaluesobject(Optional) Default values passed to the screen
menunamestring(Optional) Menu name to be displayed
isviewonlyboolean(Optional) Set to true to make the screen read-only

PrintDocument function

Used to call the print document against the respective source

Default Variant

Return Type
N/A

Syntax

PrintDocument({},<Print Document ID>,"")

Example:
function print() {
PrintDocument({},3001361,"")
}

Parameters

Print Document IDNumber : defines Print Document Design ID


CallFormEvent function

Used to execute toolbar actions on the CRUD page.

Default Variant

Return Type
N/A

Syntax

CallFormEvent("<<Toolbar Action Name>>");

Example:
CallFormEvent("Submit");

Parameters

Toolbar Action Name String : following are the list of actions

ActionDescription
AddOpens the form to add a new record.
EditEnables editing of the selected record.
SubmitSubmits the current form data.
CloseCloses the current form or page.
HideCloseHides the close button on the form.
SearchTriggers a search operation.
PrintPrints the current record or form.
ApproveApproves the current record.
ReviewSends the record for review.
RejectRejects the current record.
Task HistoryDisplays the task history.
Draft SaveSaves the form data as a draft.
RestoreAllows to load the fresh form.
DeleteDeletes the selected record.
RefreshRefreshes the data or form view.
LoadLoads the form or data again.

GetLocalStorage function

Access values from session storage

Default Variant

Return Type
string|number|date|time|date and time|

Syntax

let <<Variable Name>> = GetLocalStorage("<<key>>");

Example:
let userid = GetLocalStorage("usercode");

Parameters

Key string : Name used to store and retrieve the value


SetLocalStorage Function

Set a value in session storage

Default Variant

Return Type
string|number|date|time|date and time|

Syntax

SetLocalStorage("<<Key_ID>>","<<key_value>>")

Example:
SetLocalStorage("usercode","1005")

Parameters

Key ID string : Unique Id for storing data in local browser.

Key Value object : Name used to store the value.


CallParentControlEvents function

Executes the parent control's event method from a event.

Default Variant

Return Type
NA

Syntax

CallParentControlEvents(psdata);

Example:
CallParentControlEvents([{"ctrlid":"72",event:"onClick"}]);

Parameters

psdatajson : A JSON array where each object represents a control event to trigger.

ctrlid integer : The ID of the control on which the event should be triggered.

event String : The name of the event that wants to be triggered (e.g., "onClick", "onChange",etc..)


ControlsValidaton function

Validates whether the specified controls marked as 'Required: true' are filled. If any required field is empty, the function returns false and displays the message: “Please fill the mandatory field.”

Default Variant

Return Type
NA

Syntax

Controls Validation(id);

Example:
Function Submit Form() {
if (!Controls Validation(["20", "40"])) return alert("Please fill all required fields.");
alert("Form submitted successfully!");}

Parameters

id String : Control ID (required) – Give one or more control IDs as a comma-separated array... like [34,677,12]

** Applicable Controls - Drop Down, Input Text , Input Number


SetLoading Process

To show a loading spinner.

Default Variant

Return Type
N/A

Syntax

SetLoading(value)

Example:
SetLoading(true);

Parameters

value boolean : returns true or false


ChangeWorkflowProcess process

Allows to create a custom workflow to some specific needs

Default Variant

Return Type
N/A

Syntax

ChangeWorkflowprocess(psJsonData)

Example:
ChangeWorkflowprocess({"Workflowno":"400321","Wfprocno":"Ijd1AQeSre"})

Parameters

psJsonData string : Change Workflow Process in Json format.

Workflowno number : Mention the workflow object id

Wfprocno string : Mention the workflow process id


ConsoleLog

Used to view the values contained in the received data. To access this, open your browser's Developer Tools, go to the Inspect option, and navigate to the Console tab to check the output.

Default Variant

Return Type
N/A

Syntax

ConsoleLog(psData);

Example:
ConsoleLog("Welcome to Sterlo" );
ConsoleLog("Welcome to "+ lsUserName);

Parameters

psData string : Using console.log(variable), prints the variable based on its string,number, etc.


ShowInPopup

Show controls in the popup, based on control 'Show In Popup' property configuration.

Default Variant

Return Type

string | number | date | time | date and time |

Syntax

ShowInPopup(<<Value>>);

Example:
ShowInPopup(true);

Parameters

value string : If showInPopup is set to true, the screen opens as a popup in the preview. If set to false, the popup does not appear. Configure this JSON value in the showInPopup property of the control that needs to be shown.


GetReportCtrlProperty

Allows to retrieve data or properties from a report control, such as selected rows, filter values, or control states.

Default Variant

Return Type

string | number | boolean |

Syntax

GetReportCtrlProperty("<Control ID>", "<Property>");

Example:
GetReportCtrlProperty("12","value");

Parameters

Control ID string : Unique control id

Property string : Respective control property to get the value


IsApplicableRoles Function

Role Check Is Applicable Role The user's role is applicable for the module and shows or hides .true - Role is applicable - will be shown ,false - Role is not applicable - will be hidden

Default Variant

Return Type

Boolean

Syntax

let Is rule = Is Applicable Roles(application Number, role Number)

Example :
let rule = Is Applicable Rules(940,2070);

Parameters

appno boolean : Access based on application number is being checked.

roleno boolean : Access based on role number is being verified.

Variant 1

Visible

Return Type

Boolean

Syntax

let rule = Is Applicable Rules(appNo, roleNo)

let rule = Is Applicable Rules(940,2070);

Variant 2

Hidden

Return Type

Boolean

Syntax

let rule = Is Applicable Rules(appNo, roleNo)

Example :
let rule = Is Applicable Rules(940,2070);

fnlCallbackHandleEvent

Handles pre-submit logic; it controls whether to proceed or cancel submission based on async validations or actions. Pass true to submit, false to cancel.

Default Variant

Return Type

NA

Syntax

fnlCallbackHandleEvent(value)

Example :
fnlCallbackHandleEvent(true);

Parameters

value boolean :It Should return true or false


CallApi

Call API is used to interact with the backend, using GET to retrieve data and POST to insert or update it.

Default Variant

Return Type

Object

Syntax

Call API(poParams)

Example :
CallApi({ method: "get", lookup: "dpcrud/rt", params: { id: 50234, ver: -1, alias: -1, lparams: { "pnid": psslno } }, toa: "o" });
PropertyTypeDescription
poParamsJSONContains all required details for the API request, such as HTTP method, API endpoint, parameters, and response type.
methodStringHTTP method to be used for the API call. Examples: "get", "post"
lookupStringAPI Endpoint or Route Path where the request is to be sent
toaStringType of API response. Example: "o" means return response as object (Optional)
paramsStringAPI parameters (supports nested objects for complex data). These are query parameters or request body values. (Optional)
bodyStringRequest body for POST requests (Optional)
tcaStringAdditional authentication control (Optional)
dnStringDomain name (Optional)
actprojStringActive project ID (Optional)
actappBooleanActive application ID (Optional)
cachetypeStringCache type ("L" for Local) (Optional)
isdesignBooleanDesign mode flag (Optional)
skpdsBooleanSkip data source processing (Optional)
datasourceStringData source configuration (Optional)

*Note - It is used as Direct code both in static and dynamic screen