To retrieve information from the navigation context or interact with the navigated page, you can leverage the AppUtils, which is available in the JavaScript context under the appUtils variable.
It provides methods to access the navigation context elements and interact with specific page parts.
// access the thing object within a thing context.
appUtils.getThing()
// access the loggd-in user object.
appUtils.getUser();Context Methods
getAlert() | Returns the object describing the current context alert. |
getCustomer() | Returns the object describing the current context customer. |
getCustomerServiceLevel() | Returns the object describing the service level associated with the current customer. |
getCustomerTags() | Gets the list of tag definitions associated with the current context customer. |
getEvent() | Returns the object describing the current context event. |
getLocale() | Returns the userās current locale. |
getLocation() | Returns the object describing the current context location. |
getLocationTags() | Gets the list of tag definitions associated with the current context location. |
getOrganizationTags() | Gets the list of tag definitions associated with the current context organization. |
getPartner() | Gets the partner associated with the context thing or customer. |
getPartnerTags() | Gets the list of tag definitions associated with the current context partner. |
getServiceLevel() | Returns the object describing the service level associated with the current context thing. |
getTags() | Gets the tag names associated with the current context thing. |
getTimezone() | Gets the timezone for the current navigation context, else the userās preferred one. |
getTenant() | Gets the parent tenant object. |
getThing() | Returns the object describing the current context thing. |
getWorkSession() | Returns the object describing the current context work-session. |
getUser() | Returns the object describing the logged-in user. |
For more details about the properties available within each object, refer to the REST API Reference page.
Navigation Support Methods
isMobile() | Returns true in the case of mobile App navigation. |
isTablet() | Returns true in the case of mobile App navigation from a tablet. |
navigateTo(path) | Change the current navigated page according to the given
|
localize(text) | Localizes the given If no translations are available, the text is printed as is. |
Widget Support Methods
createFilter(filter) | Creates a new filter instance for the given The result object is a filter instance you can apply to values by calling the transform method. You can also pass a filter chain with parameters: |
createPeriodPicker(container, options, context) | Creates a Period Piker and attaches it to the given
This method returns the created
You can access this method directly from the AbstractWidget class. |
createSelectionField(container, options, context) | Creates a Selection Field and attaches it to the given
This method returns the created
|
downsampleData(data, maxCount, timestampFieldName, valueFieldName) | Downsamples the given array of |