Reference Guide
Detailed explanations of every feature and function in NutshellFormula
The Formula component allows you to perform complex mathematical calculations, using several numerical inputs. For example, you could use it to calculate scores in a questionnaire app, or total projects costs in a timesheet management app.

This Formula component calculates the sum of two form-fields and pushes it to a Results field
However, to do anything with the Formula component, you need to be pretty good at mathematics. Basic algebra is beyond the scope of this reference guide, so if you’ve never worked with mathematical formulae, this probably isn’t the best place to start.
If you are a budding mathematician, we’ll leave the possibilities to you, and explain how you get data into your Formula, and how to extract the final answer from it.
How it works
The Formula component takes any number of inputs – references to form fields elsewhere in the workflow, or to variables you’ve set up in your Data tab – which can be inserted into a mathematical formula – for example, to calculate the total cost of a product after tax.

The Data insert button allows you to insert data from any form-field or variable into your calculation
The output of the Formula is calculated at run-time, using the inputs you’ve inserted.
Writing Your Formaula
Double-click the component on the Canvas to edit the formula.

The finished (albeit very simple) Formula, including dynamically inserted datae
You’ll also notice some basic styling tools to help you make your formula a little easier to read later, and the lightning button to insert data dynamically – either from a form field elsewhere in your workflow, or from a variable.
Inputs
You can reference any form field in the workflow from within your Script – but make sure they’re all Numeric fields. Simply place your cursor where you’d like the data to be inserted and click the lightning button.

Choose where you’d like to pull your dynamic data from
It’ll ask you whether you want to insert data from a form field, or from a variable. Once you’ve chosen your data source, a placeholder will be inserted.
Output
The result of the calculation is the Formula’s output. To pass the output on to the next step in your workflow, you must link out of the Formula to the next step, and select the outgoing link.

Choose the form-field or variable you’d like to push the result into
In the Properties panel for the link, you’ll notice an extra block for Formula Options. If you open this block up, you’ll see three options available to you:
None
Selected by default, this simply ignores any output and continues along the link regardless.
Save to Form Field
This lets you choose a form field on the next Screen into which you can insert the output. If you select this option, when the end-user arrives at the next Screen, the chosen field will be pre-populated with the output from your Formula.
Save to Variable
This lets you choose a variable from your Data tab (if you have any defined), into which you can insert the output. If you select this option, any subsequent step in your workflow can reference this output – for example, inserting it into a PDF report.
If you chose to save the output to a form field on the subsequent Screen, you’ll notice an icon appear on the link to indicate this.
Formula Properties
When a Formula component is selected on the Canvas, the following settings are available in the Properties panel:
Basic Settings | |
---|---|
Label | An optional name, that appears on the Canvas. This makes reading larger workflows much easier. |
Just getting started? Try the Tutorials section for handy quick-start guides.
Prefer to watch the action? Try our series of short video tutorials.
Can't find what you're looking for?
If you can't find the answer to your problem here, please contact Nutshell's support team via our dedicated help desk.
Floor 1, Baltimore House
Gateshead, Tyne and Wear
NE8 3DF
United Kingdom