Skip to content

Reference Data Queries

A Reference Data Query retrieves records from a reference business object for use in a form. Configure a query once at form level, then select it where a lookup, event, rule, or validation needs that reference data.

Add a Reference Data Query

  1. Open the form in your project and select the Reference Data Queries tab.
  2. Select Add and enter a Name that identifies the query to other form configurators.
  3. Select the reference Business Object that contains the records.
  4. In the query builder, add conditions to narrow the records. A condition can use a fixed value or a form field, so the result can depend on an answer in the form. Add related reference data where needed.
  5. Set the remaining options described below, then select Add.
  6. Test the form with values that should return a record and values that should return none. Check the field, rule, or event that uses the query.
Option What to choose
Additional Attributes Attributes from the matching record that the form needs for display, rules, validations, or events. Include each attribute used in Search Fields (Display Value).
Search Fields (Display Value) Attributes users can search or see as the display value when selecting reference data.
Order By The attribute used to order matching records. This matters when more than one record matches.
Key Field The attribute that uniquely identifies a record.
Value Field The attribute used as the record's value or label.
Max Records The maximum number of matching records to retrieve. The form editor defaults to 100; choose a smaller limit when appropriate.
Persist Turn this on when the query result should be saved with the form and available when the saved form is opened again. Leave it off when the result is only needed while the form is in use. This setting applies to the query result; it does not change whether the reference business object's records are saved.

If several records match but a form action uses one result, the first record in the chosen order is used. Set Order By and suitable conditions when the chosen record matters.

Use the query in a form

  • For a lookup field, select the Reference Data Query in the lookup configuration. See Lookup.
  • To apply a returned value to another field or refresh the query after an answer changes, configure a form event.
  • To validate a field against a pattern returned by the query, see Regex Validation.

To change a query, select it on the Reference Data Queries tab and choose Edit. Save with Save & Close, then test the form again if you changed its conditions, attributes, ordering, or Persist setting.