On-screen actions - Logic block

Studio has a range of different action blocks that you can use to build different on-screen actions. These actions happen on the client-side and thus enable you to get a response immediately. These actions typically involve actions like adding a logical flow with branching tasks, adding delays, app related actions like hide or displaying a page loader.

logic block

The Logic Block provides you with tasks that are based on logical actions. You have here the Branch task, Delay task, and the Compute Task.

Branch

Studio enables you to provide conditional tasks without writing a single line of code. This is the branching feature that enables you to define conditions or rules for the different tasks and to then perform actions based on whether the condition/s is satisfied.

logic branch task

There are a minimum of two branches that you would need to define, there can be more if required. The branching is usually going to be a continuation of another task like an approval task or input task or others.

In each Branch, you would provide a condition that would return TRUE or FALSE. In this example here we are adding a condition that if the Rating given is 5 star then the next action like a confirmation message or Toast should be shown. In this case the condition would be stated as seen in the illustration below where rating1 is the Rating control added to the form. LOOKUP and VLOOKUP functions would not work in this branching formulas.

So when either of these conditions is satisfied the next actions would be completed accordingly.

Delay

With the Delay action, you can add a delay of a few milliseconds between two actions.

logic delay task

To add a delay action to your action flow, under Logic block, select Delay and click Continue. Then Configure Action Fields by adding the Duration in Milliseconds and click Next. Provide an Action Unique Name that is self-explanatory. Click Finish.

Now if you add another action after the delay action added here there would be a short delay before the next one.

You can then specify a condition as to when to execute the action and which environment. An Action Unique name is important that would help you identify the tasks in the flow.

Compute

The compute block enables you to add the formula variables and use formulas to set the values for the variables that you would be defined here.

logic compute task

In the example here we would find the maximum of a row from one of the forms. So we have defined the variable Max_val here and added the Max() formula. When this action flow is run, the variable value would be set by deriving using the respective function. The variable value set here would then be available in the next steps of the action flow.

So in this example, if we want to add an email notification informing us about the value derived, then it would be fetched in the email action as [actionblock.formulavariable] which in this example here is MaxVariable.Max_val.

You can then specify a condition as to when to execute the action and which environment. An Action Unique name is important that would help you identify the tasks in the flow.

In the example, we would find the maximum of a row from one of the forms. So we have defined the variable Max_val here and added the Max() formula. When this Action flow is run, the variable value would be set by using the respective function. The variable value set here would then be available in the next steps of the action flow.

So in this example, if we want to add an email notification informing us about the value derived, then it would be fetched in the email action as [actionblock.formulavariable] which in this example here is MaxVariable.Max_val.

You can then specify a condition as to when to execute the action and which environment. An Action Unique name is important that would help you identify the tasks in the flow.