πŸ“– 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 .