Utilizing Compute in Your Action Flow
Compute block in Studio allows you to set formula variables and utilize formulas to calculate and assign values to these variables. This feature is particularly useful when you need to perform dynamic calculations based on your app's data.
Setting Formula Variables
To use the Compute block, follow these steps:
Logic Blocksection, select
Configure Action Fields, add the variables you want to define and specify the formulas to calculate their values. For example, you can calculate the maximum value from a row of data and store it in a variable.
Provide a clear and descriptive
Action Unique Nameto identify this compute action in your action flow.
Finishto complete the setup.
Practical Use Cases
In the example above, we determine the maximum value from a row of data in a form. We've defined a variable called
Max_val and added the
Max() formula to calculate the maximum value. When you run this action flow, the variable
Max_val will be assigned the calculated value.
Now, if you want to send an email notification containing this calculated value, you can reference it in the email action as
[actionblock.formulavariable], which in this example is
Compute block empowers you to perform precise calculations and set variables based on dynamic data. This functionality can be valuable for a wide range of scenarios, from data analysis to generating notifications with calculated values.
Whether you're calculating statistics, aggregating data, or customizing messages with dynamic content, the
Compute block gives you the flexibility to create more intelligent and responsive apps.