Basic Usage of Formulas

In Kintone, you can use formulas.
You set formulas in the Calculated field or the Text field. In formulas, you can use values of other fields.
When you set formulas, you must use field codes as described below.

1. In a field that you want to refer to in your formula, set a field code.

2. In the Calculated field or the Text field, specify an formula that includes the field code.

Example of displaying the result of the unit price multiplied by the quantity: Example In the above example, two Number fields ("Unit Price" and "Quantity") and two field codes ("Unit_Price" and "Quantity") are set in the app form. Then, the formula "Unit_Price*Quantity" is set in the Calculated field.


This section describes the way to set a formula, by using an example of an order management app.
You use the Number field to enter a number, and the Calculated field to display result.

Image of the completed app: Completed formula

  1. Click the app setting button Setting button on the upper right of the record view, and select the "Form" tab.

  2. From the parts list shown in the left side, drag and drop two Number fields.

  3. Open the screen to set the Number field, and set the field name and the field code.
    In the first Number field, specify "Unit Price" as the field name and "Unit_Price" as the field code. Then, in the second Number field, change the field name and the field code to "Quantity", and click Save.

  4. Place the Calculated field.

  5. Open the screen to set the Calculated field, and enter "Subtotal" as the field name.

  6. Set the formula. Since you perform calculation by multiplying the unit price by the quantity, enter "Unit_Price*Quantity".

  7. Click Save for the Calculated field.

  8. Click Save Form on the upper left side of the screen, and then click Update App on the upper right side of the screen.

Now you have completed the formula settings.
Open the record details, and enter an unit price and a quantity to see the result in the Subtotal field. By entering these values, subtotal is automatically calculated