Skip to content
  • There are no suggestions because the search field is empty.

How to Use Text Pluralisation in Calculations (Child/Children)

Learn how to use text pluralisation in calculations (child/children) in Smarter Drafter Pro.

The Calculation Builder in Smarter Drafter allows you to create simple mathematical calculations within your forms. Whether you want to add, subtract, or perform other basic operations, the Calculation Builder makes it easy to automate these processes. This guide walks you through building a simple calculation to get you started.

Instructions

1. Navigate to Your Form

  • Open the form where you need to add the pluralisation calculation.

2. Create a New Field

  • Click on Add Field to create a new field. This field will display the pluralised text based on the condition you set.

3. Choose the Field Type

  • Select a Text field type, as this will allow the output to be displayed as text (e.g., "Child" or "Children").

4. Set Field Properties

  • Complete the field properties, such as giving the field a descriptive name. Set the field to Hidden or Read-Only, depending on whether you want the user to see the result.

5. Select the Calculation Tab

  • Click on the Calculation tab in the field properties to open the Calculation Builder.

6. Click Start Here

  • Click the Start Here button to access the Calculation Builder tool. This will help you create the pluralisation logic.

7. Select the Data Type and Calculation Type

  • In the builder, choose Conditional as the data type, and select If for the calculation type. This will allow you to create a conditional statement to determine whether to show "Child" or "Children.

8. Insert the Repeat Count Field

  • To count how many children the user has entered, you need to insert a repeat count field. Click the Reference Field drop-down and select the field that tracks the number of children entered (e.g., a repeatable "Children" section).
  • In the calculation, this will refer to the repeat count of that field.

9. Create the IF Statement

  • In the calculation expression, set the logic for pluralisation:

  • IF the repeat count equals 1, THEN return "Child"
  • ELSE return "Children". Your expression should look something like this: IF repeat_count = 1 THEN "Child" ELSE "Children"

10. Apply and Save

  • After entering the conditional logic, click Apply to insert the calculation. Then, click Save to finalise the calculation.

11. Test the Pluralisation

  • Test the form by entering different numbers of children. Ensure that when the user enters 1, the result is "Child," and when they enter more than 1, the result is "Children."

NOTE: We do not need to cater for NIL children as this section uses logic to check whether there are any children and won’t trigger if the answer is no. Therefore, if the children section is in play, that means the answer was yes, so there is at least one child


Common Issues & Solutions

  • Issue: Pluralisation doesn’t work when no children are entered
  • Solution: Ensure that the repeatable section is set up correctly, and that the calculation checks for cases where the field count is 1 or more. The logic should not trigger when there are no entries.