I have a setup with two fields: Input and Output, both defined as Number types.
My goal is for the Output field to automatically display the result of Input * 2 as soon as a value is entered in the Input field.
For example, if a user enters 2 in the Input field, the Output field should automatically show 4.
I attempted to achieve this using a signal to update the Output field dynamically. However, since the field type is Number, it seems to restrict the use of formulas or expressions for such updates.
You can use $Formula{...} merge syntax for this. Unfortunately, as you encountered, we do not support merge syntax currently for non-text fields so the field you want to update must be a text type.
In your case, the field update should be $Formula{getField("input") * 2}.
I had a quick question regarding the usage of $Formula{...} for updating field values based on multiple other fields within a collection.
I understand that currently, merge syntax is only supported for text fields, and simple formulas like $Formula{getField("input") * 2} are valid in such cases.
However, I’d like to confirm:
If I need to update a particular field by performing arithmetic operations (addition, subtraction, etc.) using multiple other fields from the same collection record, what would be the correct way to structure the formula?
For example, if I have fields like fieldA, fieldB, and fieldC, and I want to store the result of (fieldA + fieldB - fieldC) into another text field, how should I write this formula using the $Formula{} syntax?