Skip to content
AutomatedOn Help Centre

Test fields from another dataset in a rule

Sometimes the information a rule needs isn't in the process's own dataset. For example, the process might fetch enrolments while the rule needs details from the learner's record. You can point a condition at a different dataset, and AutomatedOn looks that dataset up for each record.

Before you start

Create the lookup dataset so that it returns the one record that belongs to the current record. Use $$FieldName$$ tokens with field names from the process's own records.

Steps

  1. Create the lookup dataset

    For an OData dataset, add a filter such as UserId eq '$$UserId$$'. For a REST dataset, use the token in the path or parameters, such as /users/$$UserId$$. For each record, $$UserId$$ is replaced with that record's UserId value.

  2. Point the condition at it

    In the rule's condition, pick the lookup dataset in Dataset, then pick the Field to test from its list.

  3. Test it

    Save and publish, then use the process's Test tab to check the results. The process's Queries tab shows the lookup query template.

More detail

How lookups work

  • One lookup request is made per record, for each lookup dataset the rules use. Up to 10 run at the same time.
  • Only the first record returned is used.
  • The fields that come back, including the lookup dataset's own Select fields, are added to the record.
  • Values put into OData filters are quoted safely, and values put into a REST path are made safe for a web address.
  • Tokens that aren't record fields are filled in from the process's parameters.

When something goes wrong

  • If a token can't be filled in, that record fails with a message like Unresolved parameter(s) UserId in rule dataset query filter. (dataset 'Learner details'). For REST lookups it ends in rule dataset request. Check the token matches a field name on the process's records.
  • If the other system returns an error for a record, that record is checked without the extra fields, so conditions on them won't find a value.

Testing the record's own data instead

To test a field from the record itself, pick the process's own dataset in the condition. That doesn't need any extra requests.

Was this guide helpful?