Customizing Dataset Record Search Criteria with Index and Header Rules

Prev Next

🔑 Required permission: Rules Editor

A dataset record's index determines which values users can search for to find the record. Its header determines the identifying information that appears with the record's name in search results. Together, they help users find records and tell similarly named records apart.

By default, dataset records are searchable by name and key, and only the record's name appears in search results. Use an Index/Header rule to add search values, such as a location or a former name, and to display them as the record's header.

mceclip0.png

Unlike person records, which use separate Index and Header rules, each dataset in your database gets its own combined Index/Header rule: any value you add is both searchable and displayed. If your database has multiple datasets, create a separate rule for each one.

The index and header appear in Omni Search results and in form autosuggest lists.

mceclip0.png

Creating the rule

📝 Note

Standard datasets delivered with your Slate database, such as Organizations or Funds, may come with their own Index/Header rules. You can edit these as needed for your operations.

  1. Go to Database → Rules.

  2. Select New Rule.

  3. Configure the rule's settings:

    • Name: Enter a descriptive name, such as Organizations Index/Header.

    • Type: Select Configurable Joins.

    • Category: Select Records.

    • Base: Select the dataset the rule applies to, such as Organizations.

    • Rule Type: Select Index/Header.

    • Folder: Select a folder to keep rules organized, or select Other and enter a name to create one.

    • Exclusivity Group: Leave the default. Slate places Index/Header rules in an exclusivity group automatically, so only one Index/Header rule can act on a record at a time.

    • Non-deterministic: Leave the default, Rule is deterministic and has an exclusive priority.

    • Priority: Enter a whole number, such as 1 if this is the dataset's only Index/Header rule.

    • Status: Select Preview so you can test the rule before it affects records.

  4. Click Save.

Configuring the rule

  1. In the Action section, set Action to Replace Values from Formula. The Exports and Formula settings appear.

  2. Add a subquery export and configure its settings:

    • Name: Enter a name, such as Index and Header.

    • Output: Select Concatenate.

    • Export Separator: Enter a separator, such as a comma followed by a space (, ). The separator appears only between values that exist, so the header never starts or ends with a stray comma.

    • Exports: Add the values to search by and display. Add literal exports for labels or a new line (\n) as needed.

  3. Select Save.

  4. In Formula, type @ and select the subquery export from the list. Note: The formula box accepts T-SQL, but it’s recommended to build your entire index/header as a single subquery export.

  5. Select Save.

📝 Note

Because datasets use a single, combined Index/Header rule, any formatting you add is also searchable. A literal like “Former Name:” becomes a searchable term.

📖 Further reading: For a complete example that applies these steps to organization records, see Add Location Information for Organization Records via Index/Header Rule.

Testing and activating the rule

Test the rule before activating it, then apply it to existing records:

  1. Edit the rule and set Status to Active.

  2. Perform a Retroactive Refresh so the rule runs on existing records.

  3. Verify the results: in Omni Search or a form autosuggest list, search for a value only your rule adds, and confirm the record appears with its new header. Name and key remain searchable regardless.

⭐ Best practice

Test the rule in your test environment before activating it in production: re-provision your Test environment or use Suitcase to copy the rule over.

Can a dataset have more than one Index/Header rule?

Dataset records can have more than one index/header rule, but rules never combine: each record gets its index and header from a single rule: the highest-priority rule whose filters it matches. To add or change values for all records, edit the existing rule's exports. Creating a second rule does not add values to the first.

Multiple rules apply different index/header values to different populations of records. Additional rules can be used to handle variations on an index/header too complex for a single subquery export. See Exclusivity Groups for how priority determines which rule applies.

Still looking for what you need?