Skip to main content

Inside a business component

Platform allows to specify SQL instructions including binding variables.

These binding variables are always defined using the notation:

:XXX

where XXX is the variable name, always in upper case.

These variables will be automatically replaced by the corresponding values available at user session level.

The user session is composed of a set of variables:

  • predefined variables, automatically set by Platform, when the user logs on
  • custom variables, defined using the addCustomApplUserVars server-side javascript method
  • input parameters, passed to the business component, defined in the business component definition window (input pars subfolder)

The predefined variables are:

Variable nameDescription
:APPLICATION_IDapplication identifier
:BASE_URLserver base url
:COMPANY_IDcompany identifier (used in case the app supports partitioned data)
:SITE_IDsite identifier
:USERNAMEcurrent user
:UUID or :DEVICE_IDdevice id, i.e. a unique identifier for a specific device (more specific than the username)
:LANGUAGE_IDcurrent user
:DOCUMENTS_DIRabsolute path within the mobile device, where files are stored;it is a folder inside the “customFiles” default app folder.
:TODAYcurrent date
:NOWcurrent date+time
:YEARcurrent year
:GPS_LATITUDEcurrent latitude
:GPS_LONGITUDEcurrent longitude
:GPS_ALTITUDEcurrent altitude
:GPS_SPEEDcurrent speed
:APP_VERSIONcurrent app versione
:LAST_SYNC_DATElast sync date