Formula Builder
Estimated Reading Time:
Overview
The Unqork Formula Builder uses an AI formula assistant to create and troubleshoot Calculator component formulas in your applications. The Formula Builder uses a prompt and response layout: Creators Also known as Unqork Users, or Designer Users; is anyone who is inside the Unqork platform. enter a statement in the prompt box, the Formula Assistant evaluates the statement, then responds to the Creator with a formula. Creators can then adjust the formula by entering additional statements. Once the Creator is satisfied with the formula, the Formula Builder inserts the response into the Calculator component's Outputs table.
Creators can also enter a new or existing formula in the Formula Field. They can then prompt the Formula Assistant to troubleshoot the formula for issues, or modify it.
There are three methods for using the Formula Builder in a Calculator component:

Prompt the Formula Assistant to build a new formula.

Prompt the Formula Assistant to evaluate or modify the existing Outputs formula.

Insert a new formula and prompt the Formula Assistant to evaluate or modify it.
TIP To discover more Formulas and what they do, view our Formulas landing page.
Accessing the Formula Builder
From the Module Builder, you can access the Formula Builder in the Calculator Component's Outputs table.
To access the Formula Builder:
1.  In the Module Builder, drag and drop a Calculator component onto your canvas. 
2.  Under Actions, to the right of Inputs & Outputs, click Edit, The Inputs & Outputs panel displays. 
3.  Under Outputs, navigate to a row where you want to build or edit a formula and click the (Arrow) button. The Formula Builder modal A modal is a window that appears on top of the content you are currently viewing. displays. 
Navigating the Formula Builder
The Formula Builder consists of three parts: the formula field, the Formula Assistant window, and the prompt box.
The following table describes each part of the Formula Builder:
Setting 
Description 


1 
Formula Field 
If the Outputs row contains a formula, it displays here. Otherwise, this field defaults to empty. You can also enter a new formula and prompt the Formula Assistant to adjust it. 
2 
Formula Assistant 
The Formula Assistant is an AI that evaluates the Formula Field and the statements you enter in the Prompt Field. If the Formula Assistant understands the statement, it builds a formula. Otherwise, the assistant states that it cannot create a formula with the statement provided. The Formula Assistant also offers prompt suggestions for new and existing formulas. Click on the suggestion statement to prompt the Formula Assistant for the statement. 
3 
Prompt Field 
Enter a statement and click Send. The Formula Assistant responds with a formula based off your statement. To use the response, click Apply. Otherwise, you can adjust the formula by entering another statement. 

Cancel 
Closes the Formula Builder modal and without saving changes. 

Save and Close 
Closes the Formula Builder modal and saves the value in the Formula Field. NOTE If the Formula Assistant responds with a formula, and you do not click Apply, then the formula is lost when clicking this button. 
Using the Formula Builder
After accessing the Formula Builder, you can use it in one of three ways: modify or troubleshoot an existing formula, modify or troubleshoot a new formula, or build a new formula.
Building a New Formula
Ask the Formula Assistant to build a formula for you. The Formula Assistant uses your statement in the Prompt Field to generate a formula.
On the Calculator component's Inputs & Outputs page:
1.  Navigate to the Outputs table. 
2.  In an empty row, click the (Arrow) button. The Formula Builder displays. 
3.  Select the Prompt Field and enter a statement. For example, Combine the firstName, lastName, and middleName keys into a single string.. 
The Formula Assistant generates a new formula using the Prompt Field statement.
4.  Click Apply. The new formula displays in the Formula Field. 
5.  (Optional) If the formula does not meet requirements, enter another statement. 
Modify an Existing Formula
If your Outputs table has existing formulas, use the Formula Builder to evaluate and modify them.
On the Calculator component's Inputs & Outputs page:
1.  In the Outputs table, navigate to a row with an existing formula. 
2.  Click the (Arrow) button. The Formula Field displays the existing formula. 
3.  Select the Prompt Field and enter a statement starting with Using the above formula,. For example, Using the above formula, add middleName key to the end.. 
The Formula Assistant generates a new formula using the Prompt Field statement and the Formula Field value.
4.  Click Apply. The new formula replaces the existing formula in the Formula Field. 
5.  (Optional) If the formula does not meet requirements, enter another statement. 
Modifying a New Formula
If you have a new formula you want to evaluate or adjust, you can enter it into the Formula Field. If your Outputs table has existing formulas, you can use the Formula Builder to evaluate and modify them.
On the Calculator component's Inputs & Outputs page:
1.  Navigate to the Outputs table. 
2.  In an empty row, click the (Arrow) button. The Formula Builder displays. 
3.  In the Formula Field enter a formula. 
4.  Select the Prompt Field and enter a statement starting with Using the above formula,. For example, Using the above formula, add the middleName key to the end. 
The Formula Assistant generates a new formula using the Prompt Field statement and the Formula Field value.
5.  Click Apply. The new formula replaces the existing formula in the Formula Field. 
6.  (Optional) If the formula does not meet requirements, enter another statement. 
Helpful Statements
The table below contains a list of useful statements when prompting the Formula Assistant.
Statement 
Description 

Undo last change. 
The Formula Assistant reverts the last change it made to the formula. 
Is this formula broken? 
The Formula Assistant analyzes the formula in the Formula Field and explains the issue. 
Convert the formula into {{Formula Type}}. 
Replace {{Formula Type}} with an Unqorksupported formula such as Moment.js, LODASH, VBA (Visual Basic for Applications), or HotFormulaParser. The Formula Assistant analyzes the formula in the Formula Field and builds it in the new format. TIP To discover more formula formats, view our Formulas landing page. 
Best Practices

Review AI Generated formulas for accuracy before using them in production environments.
Resources