Skip to content

Platform Specific Binding

Platform specific binding allow application to pass value depending on the device's platform. This allows app more flexibility and greater control in certain platform.

Indicator

  • The $ indicator could be applied to all properties value including string literal, binding, globals, ActionBar, ToolBar, FormCell controls, Sections controls, Extension controls.

  • The key is PLT

  • Consists of three parameters, first one for iOS, second one for Android, and third for Web.

  • It is advised to add single quote (\') for string literal within the indicator to mark the start and end of the string value, e.g. $(PLT,'string value for iOS','string value for Android','string value for Web').

  • The supported value types for parameter are string, integer, boolean, Resolvable value types.

  • Complex types (array and object) are not supported as parameter value.

  • If no value to be set on one of the platform parameter, please specify null

Description

Return the specified string according to platform

Usage

$(PLT, <value for iOS>, <value for Android>, <value for Web>)

Parameters:

Parameter Name Type Required? Descripton
Value for iOS String Literal, ResolvableValue Optional Value for iOS
Value for Android String Literal, ResolvableValue Optional Value for Android
Value for Web String Literal, ResolvableValue Optional Value for Web

Examples

  • $(PLT,'text to be displayed on iOS','text to be displayed on Android','text to be displayed on Web)
  • $(PLT,'$(L,work_order_id)','/AssetWorkManager/Globals/Test.global''/AssetWorkManager/Globals/Test2.global')
  • $(PLT,'#Page:CurrentPage/#View:OrderDesc/#Property:Text','/AssetWorkManager/Rules/Description.js','/AssetWorkManager/Rules/Rule.js')
  • $(PLT,123,456,789)
  • $(PLT,true,false,true)
  • $(PLT,null,'some text for Android',null)
  • $(PLT,'some text for iOS',null,'some text for Web)
  • $(PLT,'some text for iOS')

Last update: October 13, 2020