🔑 Required permission: Rules Editor
The index for an organization record determines which values users can search to find it. The header is the identifying information that appears with the organization’s name in search results.
Most Slate databases ship with an Organizations Index/Header rule, which populates location data for new organization records. If your database was provisioned before the rule became standard, create it with the steps below.
☑️ Prerequisites
This procedure assumes you can build a join and a subquery export. If either is new to you, read these first:

Add location data to the Organizations Index/Header
This example rule will set the organization record’s index/header value to the organization’s city, followed by its state or country.
Create the rule
📝 Note
Your database might already include an Organizations Index/Header rule. Check Database → Rules before creating a new one. If it exists, edit it rather than starting from scratch.
Go to Database → Rules.
Select New Rule.
Configure the following settings:
Name: Enter a name, such as Organizations Index/Header.
Type: Select Configurable Joins.
Category: Select Records.
Base: Select Organizations.
Rule Type: Select Index/Header.
Folder: Select a folder to keep rules organized. Select Other and enter a name to create a new folder, if needed.
Exclusivity Group: Set automatically to Index/Header. Slate places dataset Index/Header rules in this Exclusivity Group, so only one Index/Header rule can apply to a record at a time.
Non-deterministic: Leave it set to 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. If you create multiple rules of the same type, see Exclusivity Groups.Status: Select Inactive.
Select Save to create the new rule.
Configure the subquery export
After creating the rule, configure its action, joins, and exports to build the index/header value.
In the Action section, set Action to Replace Values from Formula.
(Optional) Add filters if the rule should update only some records. Otherwise, leave the Filters section empty so the rule applies to all organization records.
The subquery export in this example returns a concatenated string in the following format: City, State (if US), Country (if not US).
Create the Index-Header subquery export
Create a Join to Address by Rank Overall, rank
1(the organization’s primary address). That join becomes the base for the exports and filters you add below.Create a subquery export.
Configure the following settings:
Name: Enter a name, such as Index-Header.
Output: Select Concatenate to combine multiple values into one string.
Row Offset:
1Export 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.
Inside the subquery export, add an Export for City from the Address by Rank Overall join.
Create the “State if US” subquery export
This nested subquery export returns a state if the address is in the United States. Otherwise, it returns no value.
In the “Index-Header” subquery export window, select Subquery Export to add a nested subquery export.
Configure the following settings:
Name: Enter a name, such as State if US.
Output: Select Rank.
Row Offset:
1
Add a Region export from the Address by Rank Overall base.
Add a Country IN United States filter from the Address by Rank Overall base.
Select Save.

Create the “Country if Not US” subquery export
This nested subquery export returns a country if the address isn't in the United States. Otherwise, it returns no value.
In the “Index-Header” subquery export window, select Subquery Export to add a nested subquery export.
Configure the following settings:
Name: Enter a name, such as Country if Not US.
Output: Select Rank.
Row Offset:
1
Add a Country export from the Address by Rank Overall base.
Add a Country NOT IN United States filter from the Address by Rank Overall base.
Select Save.

Save the Index-Header subquery export
Verify that the Index-Header subquery export is set to concatenate, with three exports inside it: City, State if US, and Country if Not US.
Select Save.

Set the formula and save the rule
After configuring the subquery export, set the rule to use your created subquery export and save it.
In the Formula field, type
@to see a dynamic list of available variables, then select your subquery export,@Index-Header.Select Save.
Test and activate the rule
⭐ Best practice
Index and header rules change how every user searches for organization records. Test the rule in your test environment before activating it in production.
🔔 Work in test is lost when re-provisioning
Ask any colleagues who might be using your test environment before re-provisioning. If they’ve been working on something in test that hasn’t been copied to production, that work will be lost.
Test the rule in your test environment before activating it in production:
Move the rule into your test environment. Use Suitcase to copy the rule to test, or re-provision your test environment to use a current database snapshot which includes the rule.
In your test environment, select Edit on the rule, set the Status to Active, and select Save.
Run a Retroactive Refresh on a small set of records so the rule runs on them:
Select New Query from the rule’s menu.
Add at least one export and select Run Query.
From the query Output list, select Retroactive Refresh, then select Export. A confirmation dialog appears showing a count of records that will be queued.
Select Submit, then select OK.
Open one of the records.
Select the Preview pending actions link at the top of the record. It appears when the record has recently been queued for rule evaluation.
On the Preview Actions screen, select Display.
After the preview loads, select Force premature rule execution. This runs the rule on the record immediately, instead of waiting for the next scheduled execution.
Verify the results:
Confirm the header by looking up a record in the Omni Search. The text below the record’s name updates with the new information.
Confirm the index by searching for a value only your rule adds, and confirm the record appears in the results.
When the test results are correct, activate the rule in production:
If you changed the rule while testing, copy it back to production with Suitcase and select Merge Existing so the production rule is updated rather than duplicated.
In your production database, select Edit on the rule, set the Status to Active, and select Save.
Run a Retroactive Refresh so the rule runs on records that already exist. Rules run when a record changes, not when a rule changes, so existing records keep their current values until they’re queued. In a production database, run it during a period of low system usage to avoid impacting performance.
Further reading
📖 Customizing Dataset Record Search Criteria with Index/Header Rules: the same procedure for any dataset, without the Organizations-specific detail.
📖 Database Structure & Determination of Table Ranks: how Slate ranks addresses, applications, and schools, including the address this rule reads.