Global Variables

Navigation:  Knowledge Base > Page Editor > General Attributes >

Global Variables

Previous pageReturn to chapter overviewNext page

Global Variables are variables which allows user to fetch some global values like current date and time, Instance and Project detail.

 

mobilous_appexe_npe_myproject_generalattribute_globalvariable1     mobilous_appexe_npe_myproject_generalattribute_globalvariable2

 

__NOW__

This variable returns Current Date & Time in a particular format("YYYY-MM-DD HH:MM").

1. It can be compared with DatePicker UI value using conditions.

2. It can be used for inserting or updating table record if user wants to insert or update Current Date & Time.

3. It can be used in any Text UI Part, if you want current date&time to be appended with any other string/text of the UI part. Example : TextView UI Part text could be written as "John reached office at NOW".

__NUMREC__

This variable will be only used at the time of Remote/Local DB Operations.

__INSTANCENAME__

Return the name of the the instance eg : "test.mobilous.com".

__PATH__

Return a path like "appexe/USERNAME/PROJECT_ID/".

__BASEURL__

Returns complete path like "http://INSTANCENAME/appexe/USERNAME/PROJECTID/".

__PROJECTID__

Returns a project id in number.

__PROJECTSTATE__

Return the state of a project - preview/production/release.

__ERROR_CODE__

Returns code other than HLCOMMERROR code whenever we get NACK from commserver on performing remote database actions.

__ERROR_MSG__

Returns Error Message if the response code is other than HLCOMMERROR whenever we get NACK from commserver on performing remote database actions. It works for Remote Select Action.

__APPVER__

Returns Application Version.

__OSVER__

Returns OS Version.

__OS__

Returns OS like Android / iOS / Chrome.

__RANDOM__

Returns any random value.

__BLANK__

Returns BLANK value. For e.g It is used to identify the field is blank or not  Mobileno != _BLANK_

__IMEI__

Returns IMEI number of the device.

 

 

Application of Global Variable __NUMREC__. It returns the total number of records in a table.

Page View- DB List View Page

mobilous_appexe_myproject_generalattribute_globalvariable_numrec1

 

Output  showing the Number of records.

 

mobilous_appexe_myproject_generalattribute_globalvariable_numrec2