Built-in JavaScript utilities
* indicates different implementations between designer mode and runtime mode.
Data storage utilities
this.utils.dataStore
- Stores and retrieves data for page references
- Methods include:
async getData(key: string)
async setData(key: string, value: any)
async clearData()
| Variable | Mandatory | Input Format | Value Options |
|---|---|---|---|
key | Yes | String | Any string |
value | Yes | Any | Any |
this.utils.context
- Passes data between pages
- Methods include:
static getDataMap(object: any)
static setData(object: any, key: string, data: any)
static getData(object: any, key: string)
static clearData(object: any) //Added in version 5.0.0
| Variable | Mandatory | Input Format | Value Options |
|---|---|---|---|
object | Yes | Any | Any |
key | Yes | String | Any string |
data | Yes | Any | Any |
this.props.context
- Shares data across pages
Third-party libraries
this.utils.FileSaver
- Uses the file-saver library for file operations
this.utils.dateFormat
- Uses the dateformat library for formatting dates
Navigation utilities
*this.utils.navigateTo(appId: string, pageId: string, data: any, object: this)
- Navigates to a specific page within an app
| Variable | Mandatory | Input Format | Value Options |
|---|---|---|---|
appId | Yes | String | Any string |
pageId | Yes | String | Any string |
data | Yes | Any | Any |
object | Yes | this | this |
*this.utils.navigateToCurrAppPages(pageId: string, data: any, object: this)
- Navigates within the current app pages
| Variable | Mandatory | Input Format | Value Options |
|---|---|---|---|
pageId | Yes | String | Any string |
data | Yes | Any | Any |
object | Yes | this | this |
*this.utils.getNavigatedData(key: string, object: any)
- Retrieves data passed between pages
| Variable | Mandatory | Input Format | Value Options |
|---|---|---|---|
key | Yes | String | Any string |
object | Yes | Any | Any |
Security and role management
this.utils.RSAUtil
- Encrypts passwords
- Methods include:
static convertJwkToPem(jwk: string)
static encrypt(text: string, pucKey: any, keyFormat = 'jwk')
| Variable | Mandatory | Input Format | Value Options |
|---|---|---|---|
jwk | Yes | String | Any string |
text | Yes | String | Any string |
pucKey | Yes | Any | Any |
keyFormat | Yes | Constant | jwk |
this.utils.RolesUtils
- Manages user roles for filtering navigators in preview mode
- Methods include:
static delete(role: string, userDomain: string)
static set(role: string, userDomain: string)
static getRoles()
static clear()
static saveRoles(roles: string[], userDomain: string)
| Variable | Mandatory | Input Format | Value Options |
|---|---|---|---|
role | Yes | String | Any string |
userDomain | Yes | String | Any string |
Utility functions
this.utils.getUrlParams()
- Retrieves URL parameters
this.utils.hasSuperAdminPrivilege()
- Checks if the current user is a super admin
*this.utils.getAssetsUrl(assetsName: string, fileName: string)
- Retrieves asset file URLs. The URL is different between design and runtime
- Added in version 4.0.4
| Variable | Mandatory | Input Format | Value Options |
|---|---|---|---|
assetsName | Yes | String | Any string |
fileName | Yes | String | Any string |
this.utils.handleProfile
- Performs virtual login with a profile in preview mode. This only works in preview and will not generate in runtime
- Methods include:
async handleProfile(data: {
userDomainCode: string;
userAccountId: string;
vault: string })
| Variable | Mandatory | Input Format | Value Options |
|---|---|---|---|
userDomainCode | Yes | String | Any string |
userAccountId | Yes | String | Any string |
vault | Yes | String | Any string |
this.utils.getCSRF()
- Retrieves CSRF token
- Added in version 4.0.5
this.utils.formatDateWithOffset: (isoString: any)
- Converts ISO string to the format with time zone offset
- Added in version 5.0.0
| Variable | Mandatory | Input Format | Value Options |
|---|---|---|---|
isoString | Yes | String | Any string |
this.utils.getMenuPassingData()
- Retrieves the passing data
- Add in version 5.0.0
this.utils.getConfig: async (key: string)
- Retrieves all global setting of the current application by key
- Added in version 5.0.0
| Variable | Mandatory | Input Format | Value Options |
|---|---|---|---|
key | Yes | String | Any string |
this.utils.ApplicationProvider.getGlobalSettings()
- Retrieves all global settings of the current application
- Added in version 5.1.0
this.props.saveContext: (key: string, value: any)
- Saves an object to be shared across pages
- Added in version 5.1.0
| Variable | Mandatory | Input Format | Value Options |
|---|---|---|---|
key | Yes | String | Any string |
value | Yes | Any | Any |
this.context.<key>
- Retrieves the object variable key name, which was saved into context
- Added in version 5.1.0
*this.utils.showMessage: async (type: MessageType, title: any, closeable: boolean, content?: any)
- Displays popup messages, configurable for manual closing or auto closing
- When
MESSAGE_DURATIONis set to 0 orcloseableis true, manual closing is enabled - Added in version 5.1.1
| Variable | Mandatory | Input Format | Value Options |
|---|---|---|---|
type | Yes | MessageType | help, warning, error, success, notice, or loading |
title | Yes | Any | Any |
closeable | Yes | Boolean | true |
content? | No | Any | Any |
Last updated on 20 May 2026