π Complete Guide to Formulas in AUTOMY
Knowledge Center β Flow Builder
By Lily Dominguez Guerra Β·
AUTOMY allows the use of formulas to perform automatic calculations in forms, actions, and entities , helping to automate processes and reduce manual errors . π― What are formulas in AUTOMY used for? β To perform calculations within a form without doing them manually. β To automate calculations in actions before execution. β To manipulate information in entities without manual processes. π How to Get the Internal Name of a Field Before writing a formula, it is essential to get the internal name of the field you will use.
How to Get the Internal Name of a Field in a Form 1οΈβ£ Go to Processes in AUTOMY. 2οΈβ£ Find the form where the field is located. 3οΈβ£ In the form settings, locate the "Internal Name" column. 4οΈβ£ Copy the name that appears there. π Internal Name Structure: {{Form.form_name.Field.field_name}} π Example: If you have a form called Vacation Request and a field called Request Date , the internal name will be: {{Form.vacation_request.Field.request_date}} π When to Use It? In an action or when using it in another form: Use the full internal name: {{Form.vacation_request.Field.request_date}} In a form: Use only the field name : {{request_date}} How to Get the Internal Name of a Field in an Entity If you want to use a formula with an entity field , follow these steps: 1οΈβ£ Go to Entities in the main menu. 2οΈβ£ Select the entity where the field is located. 3οΈβ£ Click on Settings and go to the Fields tab. 4οΈβ£ Find the Internal Name column and copy the value. π Internal Name Structure: {{Entity.field_name}} π Example: If you have an entity called Products and a field called SKU Code , the internal name will be codigo_sku, and in a formula, it will appear as: {{Entity.codigo_sku}} π Important: Entity fields can only be used in the "Dynamic Entity Operation" action of type Formula . π How to Apply Formulas in a Form? You can add a formula to a form field to calculate its value in real time . π Example: Calculating the total amount by multiplying quantity by price.
Steps: 1οΈβ£ Go to the Form where you want to apply the formula. 2οΈβ£ Create a field ( Text, Number, Decimal, or Date ). 3οΈβ£ In the field settings , look for the Formula option. 4οΈβ£ Enter the formula using the internal field name . π Example Formula in a Form: If you have the fields quantity and unit_price , you can calculate the total as follows: Multiply({{quantity}}, {{unit_price}}) π In Which Actions Can You Use Formulas? Formulas in AUTOMY can be used in the following actions : β Set Form Data β Dynamic Entity Operation β Set Variable β Conditional β Switch β Iteration β Internal Operation β Generate File β Generate Excel β SharePoint Operation β Import File β Integration β Open AI β Execute Process Action β Google Integration β FTP Operation β Execute API Call β Start Process β Execute Database Query π How to Apply a Formula in an Action? When creating one of these actions, you will see the "Value Source" option.
Select it and choose "Formula" . π How to Apply a Formula in Conditional or Switch? In these actions, when adding a condition, you must enter the formula in the "Value" field. π Types of Formulas AUTOMY provides different formula categories to help perform calculations and comparisons within processes: πΉ Comparison πΉ Arithmetic πΉ Text πΉ Logic πΉ Date & Time π Basic Recommendations for Writing Formulas Before using formulas, it's important to write them correctly .
Here are some key recommendations: π Example: β Correct (number comparison): IsEqual({{Form.productos.Field.codigo}}, 12345) β Correct (text comparison): IsEqual({{Form.clientes.Field.tipo}}, 'VIP') β Correct (date comparison): IsEqual({{Form.reservas.Field.fecha}}, '2024-05-01') π Comparison Formulas These formulas allow you to compare values and determine relationships between them.
Formula Description Example Result IsEqual Compares two values and returns True if they are equal.
IsEqual({{Form.ventas.Field.monto}}, 1000) If monto = 1000, returns True .