Skip to main content

Client-side global variables

Client-side variables are defined and used in the web page of the web browser and they are expressed as Javascript variables. Consequently, they can be referred inside a Javascript action.
The following table reports all available variables:

Variable nameTypeExample
userRolesArrayif (userRoles.indexOf("1")!=-1) { // do something }
languageIdStringlanguage identifier, e.g. IT, EN, …
appVersionString4WS.Platform version, showsed in the bottom bar
contextPathStringweb application context path; e.g. "/platform"
applicationIdStringapplication identifier
userDescriptionStringuser description, defined in the user detail form
buttonsAuthHash tablecollection of couples related to the functionalies enabled for the current logged user. Each functionality is identified by the "function id". Arrays contains 3 boolean values, related to the authorizations "can insert", "can edit", "can delete". Authorizations are defined through the "Roles" functionality. Example: buttonsAuth[“contratto.gridPanel319”] = [true,true,true];
companyIdStringidentifier of the data partition in use; 4WS.Platform supports multiple company partitions (multi-tenancy), where each partition is identified by the company id.
usernameStringusername of the current logged user
applUserParscollection of couples related to tuser parameters, defined through the user detail form.