Skip to main content

8. Create Formula and Global Fields

Formulas are powerful tools in Tonkean, enabling you to manipulate and reformat data from virtually anywhere in your workflow. Formulas are leveraged using formula fields, special fields in which you configure a formula, ranging from simply reformating an existing field to complex manipulation of multiple fields.

In this walkthrough, we create a simple formula field that takes today's date and reformats it to make it human-readable. Also, we create several global fields, which are fields that aggregate data from all the items in your module. Each global field displays as a key metric at the top of the business report, providing a helpful snapshot of one aspect of your process to all members of your team or organization.

Est. time to complete: 6 minutes

Prerequisites

  • Three update forms configured in a sequence

  • A custom status labeled New Reply

Complete 7. Leverage Tonkean Statuses before starting this walkthrough.

Video Walkthrough

Follow Along

Create a Formula Field (0:00 - 1:59)

First, we create a formula field to display today's date in a human-readable format:

  1. In the module builder toolbar, select the Fields button. The Fields panel displays.

  2. Beside Formula fields, select + Add Field. The Field Settings screen displays.

  3. In the Name field, enter "Today (Clean format)".

  4. In the Formula Editor, select Root. The formula dropdown displays.

  5. In the dropdown, search for and select DateFormat.

  6. Configure the formula by selecting values for each placeholder:

    1. Select Input, then select the variable tile, formulas_field.png. Search for and select Today, a native Tonkean field that contains the current date in unix time.

    2. Select Date Format, then select the preset tile, formula_preset.png, and select dd-M-yyyy hh:mm:ss.

    When finished configuring the formula values, select Next. The Display Settings section displays.

  7. Select the Display as dropdown and select Date, then select Save in the upper right. The Fields Settings screen closes and the module builder displays.

  8. In the module builder, locate and select the Update due date + title action block. The Update due date + title panel displays.

  9. In the Value field, after the fields we already included, insert a dash, "-", then select the insert field button, , and select Today (Clean Format).

Create Global Fields (2:00 - 4:41)

Then, we create several global fields:

First Global Field
"Count of all emails"
  1. In the module builder toolbar, select the Fields button. The Fields panel displays.

  2. Scroll down to the Global Fields section and select + Add New Global Field. The Global Field Settings screen displays.

  3. In the Where should the data for this global field come from? field, select Formula.

  4. In the Name field, enter "Count of all emails".

  5. When finished, select Save in the upper right. The Global Field Settings screen closes and the module builder displays with the Fields panel still open. Note the new global field that displays in the Global Fields section.

Second Global Field
"# of all the HR Requests"
  1. In the Global Fields section of the Fields panel, select + Add New Global Field to create another global field. the Global Field Settings screen displays.

  2. In the Name field, enter "# of all the HR Requests".

  3. In the Where should the data for this global field come from? field, select Formula.

  4. In the Count of Items section, select the Set New Condition dropdown. A new condition group displays.

  5. Select the Search data field dropdown (the first condition field) and select What do you need help with?.

  6. Select the Enter value field (the second condition field) and select HR Question.

  7. When finished, select Save in the upper right. The Global Field Settings screen closes and the module builder displays with the Fields panel still open. Note the two new global fields that display in the Global Fields section.

Third Global Field
"# of items in 'New Reply' status"
  1. In the Global Fields section of the Fields panel, select + Add New Global Field to create another global field. the Global Field Settings screen displays.

  2. In the Name field, enter "# of items in 'New Reply' status".

  3. In the Where should the data for this global field come from? field, select Formula.

  4. In the Count of Items section, select the Set New Condition dropdown. A new condition group displays.

  5. Select the Search data field dropdown (the first condition field) and select Status.

  6. Select the Enter value field (the second condition field) and select New Reply.

  7. When finished, select Save in the upper right. The Global Field Settings screen closes and the module builder displays with the Fields panel still open. Note the three new global fields that display in the Global Fields section.

You've created a new formula field to display today's date and a few global fields to provide counts of a few key pieces of process data. Next, we'll explore how these global fields display visually on the business report.

Next Step