RangeIndex() formula in auto logic question rules, including content based on age

Applies to Infiniti v8.0 or later
    Please note that from Infiniti v9 onwards the User Prompt question type has been renamed Text Field

Sometimes it is necessary to use a formula to calculate a value that can be used to determine if a particular piece of content should be included in the document.

In the formula below the RangeIndex() formula is used to place people into three different categories based on their age, the [Q4] reference is to a date of birth, possibly from a text field or data source.

RangeIndex(DateDiff(0,[q4], Today(), 1, 1), 0, 18, 55)

The formula will return 0 for child (0-18 years), 1 for adult (18-55 years) and 2 for retired (55+ years). This formula when coupled with an auto logic question is a straightforward way to include content based on age. In the screen shot below the RangeIndex()  formula answer rules determine which content is included.

Related Articles

range index category formulae decide decision autologic