Note: Implementation examples are available in the demo application. It’s recommended to consult it for better comprehension.
──────────────────────────────────────────────────────────────────────────────
Dates
Action to use
GetDeviceDateTime
Exposed as function
Yes
Create a screen actionCreate a screen action to call the corresponding action. Name it GetDateTime.
Call the GetDeviceDateTime actionOpen the screen action (created previously) and drag the GetDeviceDateTime action inside the canvas.
Trigger the screen actionWhen triggering the GetDateTime screen action, a Date Time variable is returned. This value corresponds to the date and time from the device.
Encryption
CypherText
Create a screen actionCreate a screen action to call the corresponding action. Name it Cypher.
Call the CypherText actionOpen the screen action (created previously) and drag the CypherText action inside the canvas.
Fill the CypherText parameterFill the CypherText parameter specifying the text to cypher.
Trigger the screen actionWhen triggering the Cypher screen action, a ciphered version of the specified text is returned.
Search
Highlight a text list with a searched value
HighlightSearchList
No
Create a screen actionCreate a screen action to call the corresponding action. Name it Highlight.
Call the HightlightSearchList actionOpen the screen action (created previously) and drag the HightlightSearchList action inside the canvas.
Fill the HightlightSearchList action parametersFill the HighlightSearchList action parameters specifying the id of the input that holds the text to search. The id of the container that holds the textual list (typically a List or a Table widget) must also be specified.
Add a CSS class in each textual element (expression)In a textual list, each element is displayed using an Expression inside a ListItem (if using the List widget) or inside a row (if using a Table widget). The "searchable" CSS class must be added to this Expression, to enable the highlight feature. Inserting this, each text value will be able to be searched and highlighted.
OPTIONAL: Customize highlighted elementsBy default, the matched text is highlighted by a yellow background.
Debug
Debug_StartSync
Debug_EndSync
Create a screen actionCreate a screen action to call the corresponding action. Name it DebugLog.
Call the Debug actionOpen the screen action (created previously) and drag the Debug action inside the canvas.
Fill the Debug parameterFill the action parameter specifying the debug message.
Trigger the screen actionWhen triggering the DebugLog screen action, a log is inserted in the browser console.
Delete all client logs
Debug_DeleteAll
Create a screen actionCreate a screen action to call the corresponding action. Name it DeleteLog.
Call the Debug_DeleteAll actionOpen the screen action (created previously) and drag the Debug_DeleteAll action inside the canvas.
Trigger the screen actionWhen triggering the DebugLog screen action, all client logs are deleted. To delete all the logs, the Preserve Log property must be disabled.
Timers
Focus on an input after a timeout
FocusAfterTimeout
Create a screen actionCreate a screen action to call the corresponding action. Name it FocusInputTimeout.
Call the FocusAfterTimeout actionOpen the screen action (created previously) and drag the FocusAfterTimeout action inside the canvas.
Fill the FocusAfterTimeout action parametersFill the FocusAfterTimeout parameters specifying the input id to focus, and the duration value of the timeout.
Trigger the screen actionWhen triggering the FocusInputTimeout screen action, the focus is set to the input after the specified timeout.
Execute a function after a timeout
SetTimeout
Create a screen actionCreate a screen action to call the corresponding action. Name it ExecuteFunctionTimeout.
Call the SetTimeout actionOpen the screen action (created previously) and drag the SetTimeout action inside the canvas.
Fill the SetTimeout action parametersFill the SetTimeout parameters specifying the Javascript function to execute, and the duration value of the timeout.
Trigger the screen actionWhen triggering the ExecuteFunctionTimeout screen action, the Javascript code is executed after the specified timeout.
Start / stop a timer to execute a periodical action
StartTimer / StopTimer
Create two screen actionsCreate a screen action and name it TriggerTimer. Create a second screen action and name it EndTimer.
Call the StartTimer actionOpen the TriggerTimer screen action (created previously) and drag the StartTimer action inside the canvas. Save the returned value (Timer) in a Text screen variable, useful to end this timer later.Don’t forget to save the returned Timer in a screen variable!
Fill the StartTimer action parametersFill the StartTimer parameters specifying the widget id to trigger periodically. Typically, the widget to trigger can be a Button or a Link. The duration between each period must also be specified.
Call the StopTimer actionOpen the EndTimer screen action (created previously) and drag the StopTimer action inside the canvas.
Fill the StopTimer action parameterFill the StopTimer parameter specifying the Text screen variable related to the started and saved timer. This variable is a reference of the started timer.
Trigger the TriggerTimer actionWhen triggering the TriggerTimer screen action, a timer starts and executes a periodical action. At this moment, the timer reference is stored in a screen variable, useful to stop it later.
Trigger the EndTimer actionWhen triggering the EndTimer screen action, the started timer will be stopped.
HTTP Request Handler
Add a favicon in the application
AddFaviconTag
Create the OnApplicationReady actionIn the Logic tab, right-click the Client Actions folder and create the On Application Ready System Event.
Call the AddFaviconTag actionOpen the OnApplicationReady system action (created previously) and drag the AddFaviconTag action inside the canvas.
Change the faviconIn the Data tab, under the Resources folder, the favicon can be changed. Right-click the favicon.png file and select the Change Resource option to select another favicon.
Trigger the OnApplicationReadyAfter the module loads, the OnApplicationReady executes and changes the favicon.
Get the application domain
GetDomain
GetPageName
Create a screen actionCreate a screen action to call the corresponding action. Name it RetrieveDomain.
Call the GetDomain actionOpen the screen action (created previously) and drag the GetDomain action inside the canvas. To retrieve the page name, the GetPageName action must be dragged.
Trigger the screen actionWhen triggering the RetrieveDomain screen action, the domain (or page name) is returned in a Text variable.
Perform a GET request (REST API)
RestAPI
Create a screen actionCreate a screen action to call the corresponding action. Name it GetREST.
Call the RestAPI actionOpen the screen action (created previously) and drag the RestAPI action inside the canvas.
Fill the RestAPI action parameterFill the RestAPI parameter specifying the Endpoint (URL) to perform the GET method.
Trigger the screen actionWhen triggering the GetREST screen action, the GET method starts and returns a Text variable filled with the GET result. The Status Code (and related Code text) are also returned.
Custom menu
Create and retrieve a custom menu
GetDummyMenu (client & server actions)
Create a copy of MenuManager script fileIn the Scripts folder of your application, create a script selecting the Create Script option. Name it CustomMenuManager. Inside it, copy the Javascript code available in the MenuManager script file of the ReactiveUtilities component (under Scripts folder). In other words, a copy of the MenuManager script must be created in your application.
Create the custom menuIn the CustomMenuManager script, a custom menu can be created to load later in the application. The export.menus variable must contain a list of Menu objects. Each Menu object has a Label parameter that corresponds to the name of each menu element. The custom menu has also an export.time variable. If the defined date is a null date or higher than the current one (1 hour or more), the cached menu is not fetched, and the menu defined at the server will be fetched. This server menu will be created in the next step.
Create a copy of GetDummyMenu server actionWhen the cached menu is expired, an alternative custom menu can be created and loaded. Create a screen action and name it GetDummyMenu. Open it and copy inside the canvas, the flow available in the GetDummyMenu server action of ReactiveUtilities component. The alternative menu (fetched from server) can be configured inside this server action adding each element in the Menu list.
Create a copy of GetDummyMenu screen action to load the menuCreate a global screen action (a screen action under the Logic tab). Name it GetDummyMenu. Open it and copy inside the canvas, the flow available in the GetDummyMenu screen action of ReactiveUtilities component. This screen action will verify if a cached menu is not expired and load it if it's the case. If not, the server menu is loaded.
Create a screen actionCreate a screen action to retrieve the custom menu from the cache or from the server (if expired). Name it GetCustomMenu.
Call the GetDummyMenu global screen actionOpen the screen action (created previously) and drag the GetDummyMenu global screen action (created in the step 4) inside the canvas.
Trigger the screen actionWhen triggering the GetCustomMenu screen action, the custom menu is returned in a List of Menu elements. If the cached menu is not expired, it will be returned. Otherwise, the alternative menu, created in the server action will be returned.
Math
Execute a set of mathematical functions
Math_*
Create a screen actionCreate a screen action to call the corresponding action. Name it Calculate.
Call the desired mathematical actionOpen the screen action (created previously) and drag the desired math action inside the canvas.
Fill the action parametersFill the action parameters specifying all necessary values (some actions need more than one value).
Trigger the screen actionWhen triggering the Calculate screen action, a success flag, a detailed error (if any error) and a result related to the math action are returned.
Text
Split a text by a splitter character
String_Split
Create a screen actionCreate a screen action to call the corresponding action. Name it SplitText.
Call the String_Split validation actionOpen the screen action (created previously) and drag the String_Split validation action inside the canvas.
Fill the validation action parametersFill the String_Split action parameters specifying the text to split and the related splitter.
Trigger the screen actionWhen triggering the SplitText screen action, a List of Text variable is returned with splitted elements.
Random
Generate a random decimal number
RandomDecimal
RandomInteger
Create a screen actionCreate a screen action to call the corresponding action. Name it RandomNumber.
Call the number randomizer actionOpen the screen action (created previously) and drag the desired number randomizer action inside the canvas. Both RandomInteger and RandomDecimal actions can be used as functions.
Fill the action parametersFill the randomizer action parameters specifying the min. and max. values.
Trigger the screen actionWhen triggering the RandomNumber screen action, a random value is returned between the minimum and maximum value.
Generate a random decimal GUID (based on RFC 4122)
RandomGUID
Create a screen actionCreate a screen action to call the corresponding action. Name it RandomGUID.
Call the RandomGUID actionOpen the screen action (created previously) and drag the RandomGUID action inside the canvas.
Trigger the screen actionWhen triggering the RandomGUID screen action, a random GUID in accordance with RFC 4122 is returned.
Regex
Replace a text inside another
Regex_Replace
Create a screen actionCreate a screen action to call the corresponding action. Name it Replace.
Call the Regex_Replace actionOpen the screen action (created previously) and drag the Regex_Replace action inside the canvas.
Fill the Regex_Replace parametersFill the Regex_Replace parameters specifying the text to treat, replacing text, related patterns and flags.
Trigger the screen actionWhen triggering the Replace screen action, a Text variable is returned. This value corresponds to the replaced version of the text to treat, based on specified pattern and flags.
Search a pattern inside a text
Regex_Search
Create a screen actionCreate a screen action to call the corresponding action. Name it Search.
Call the Regex_Search actionOpen the screen action (created previously) and drag the Regex_Search action inside the canvas.
Fill the Regex_Search parametersFill the Regex_Search parameters specifying the text to treat, related patterns and flags.
Trigger the screen actionWhen triggering the Search screen action, the pattern result, the first index and a boolean value to indicate if the pattern was found are returned.
Verify if a pattern exists inside a text
Regex_Test
Regex_Validator
Create a screen actionCreate a screen action to call the corresponding action. Name it ValidPattern.
Call the validation actionOpen the screen action (created previously) and drag the validation action inside the canvas. Both Regex_Test and Regex_Validator can be used.
Fill the validation action parametersFill the validation action parameters specifying the text to treat, related patterns and flags.
Trigger the screen actionWhen triggering the ValidPattern screen action, a boolean value to indicate if the pattern was found is returned.
Validator
Validate an information
IsEmailValid
IsNaN
IsTextValid
Create a screen actionCreate a screen action to call the corresponding action. Name it Validate.
Call the desired validation actionOpen the screen action (created previously) and drag the desired validation action inside the canvas.
Fill the validation action parametersFill the validation action parameters specifying the value to validate. For email validation, a custom pattern can also be added.
Trigger the screen actionWhen triggering the Validate screen action, a Boolean variable is returned to indicate if the specified value is valid.
Javascript events
Focus an input
FocusIt
Create a screen actionCreate a screen action to call the corresponding action. Name it SetInputFocus.
Call the FocusIt actionOpen the screen action (created previously) and drag the FocusIt action inside the canvas.
Fill the FocusIt action parameterFill the FocusIt parameter specifying the id of the input to focus.
Trigger the screen actionWhen triggering the SetInputFocus screen action, the focus is set to the input.
Trigger a click on a button or a link
ClickIt
Create a screen actionCreate a screen action to call the corresponding action. Name it TriggerButton.
Call the ClickIt actionOpen the screen action (created previously) and drag the ClickIt action inside the canvas.
Fill the ClickIt action parameterFill the ClickIt parameter specifying the id of the button (or link) to trigger.
Trigger the screen actionWhen triggering the TriggerButton screen action, the button (or link) is triggered.
Keyboard keys
Detect an Enter press
GetEnterPress
CloseKeyboardOnEnterPressed
Create a screen actionCreate a screen action to call the corresponding action. Name it DetectEnter.
Call the desired actionOpen the screen action (created previously) and drag the GetEnterPress action inside the canvas. To close the keyboard on Enter press, the CloseKeyboardOnEnterPressed action must be dragged.
Trigger the screen actionWhen triggering the DetectEnter screen action, a Boolean value is returned, to indicate if the Enter was pressed. For mobile devices, if the Enter key was pressed, the keyboard is also closed.
Trigger a button when pressing a key
KeyboardKeyMakeWidgetClick
TriggerButtonOnEnterKeyCode
Create a screen actionCreate a screen action to call the corresponding action. Name it TriggerOnPressedKey.
Call the desired actionOpen the screen action (created previously) and drag the desired action inside the canvas.To trigger a click when pressing the Enter key, the TriggerButtonOnEnterKeyCode action can be used.To trigger a click when pressing another key, the KeyboardKeyMakeWidgetClick action must be used.
Fill the action parametersFor both actions, the button to trigger must be specified. For the KeyboardKeyMakeWidgetClick action, the key that triggers the button must also be specified.
Trigger the screen actionWhen triggering the TriggerOnPressedKey screen action, a click will be performed on the button if the specified key is pressed.
Get a character code
GetCharCode
Create a screen actionCreate a screen action to call the corresponding action. Name it GetCharacterCode.
Call the GetCharCode actionOpen the screen action (created previously) and drag the GetCharCode action inside the canvas.
Fill the GetCharCode action parametersFill the GetCharCode parameter specifying the character to search for the code.
Trigger the screen actionWhen triggering the GetCharacterCode screen action, an Integer variable is returned, holding the code related to the specified character.
Close feedback messages
Close a feedback message
CloseFeedbackMessage
CloseFeedbackMessageUsingAPI
Create a screen actionCreate a screen action to call the corresponding action. Name it CloseFeedback.
Call the desired actionOpen the screen action (created previously) and drag the desired action inside the canvas. (CloseFeedbackMessage or CloseFeedbackMessageUsingAPI).
Trigger the screen actionWhen triggering the CloseFeedback screen action with an opened feedback message, the feedback message is closed.
Close a feedback message with timeout
CloseFeedbackMessageWithTimeout
Call the CloseFeedbackMessageWithTimeout actionOpen the screen action (created previously) and drag the CloseFeedbackMessageWithTimeout action inside the canvas.
Fill the CloseFeedbackMessageWithTimeout action parameterWhen triggering the CloseFeedbackMessageWithTimeout screen action with an opened feedback message, the feedback message is closed.
Trigger the screen actionWhen triggering the CloseFeedback screen action with an opened feedback message, the feedback message is closed after the specified timeout.