Evaluate Data types & Dynamic Note & Calculations

Note: The Evaluation item type used to be called 'Calculation' but had been replaced by 'Evaluate' item types.

The Calculation property in TilliT is available when using Evaluate Boolean/Text/Number or Read only note. However, the same tool is also integrated in the item properties Active item & hidden expressionsalongside Tolerances.

Calculations with Evaluation item type can be as simple or as complex as you need them to be. You can use either mathematics or JavaScript. If you're not familiar with JavaScript, a good source to get started with is W3 Schools.

To calculate variable values, you can reference elements in the form, using the item key, and you can also reference attributes. When you open the calculation tool, these will be listed. Simple click one and it will be added to the calculation.

However, it is important to note that depends on the Evaluation type that you choose, the system will expects the result of the calculation to be of that type. (Text, Number or Boolean)

Mathematical Calculation

In the following example, we are using a Data Entry - Evaluate Number element type.

Click on the calculator icon next to the field Calculation.

In the first screenshot, below, the attribute 'Bottle Volume' will be multiplied by 6. In this example, the value of Bottle Volume is 750, and then we are multiplying it by 7

When clicking save, you can then see the calculated number value that will be submitted for this field once the activity is completed.

JavaScript Calculation

If you're comfortable using JavaScript in your calculations, you can unlock a lot of extra functionality within TilliT. In the example below, we are using the Read only note data type. The calculation is an optional section of Read only note. You can simply use the Name or Hint property to write your note. However, using the Calculation property allows you to write more dynamic notes.

In the first screenshot, the note is made of 3 parts. The first part is a text string, written within quotations. We then add the attribute Closure Type, which is has a text value, but you can use number and Boolean types as well. Booleans will be parsed as text string (stating true or false).

Finally, we add another text string to finish the statement.

In our example, Closure Type has a value of "Cork", so the result of our calculation above becomes:

Using the AI Assistant to help

Our assistant is an AI Assistant chatbot that helps you write expressions and calculations more efficiently. It understands the context of your current snippets to provide smarter suggestions.

This feature is still in development and actively being improved. You can try it out by enabling the “Project Heads Up” feature flag. Give it a spin and let us know what you think!

Read the prompting guide!

Click on the question mark next to the assistant's header name, and you will be shown a detailed guide on prompting and how it works and what responses to expect

Demonstration: Asking and applying the response

Last updated