The Organizations dataset displays the organization’s location on the Lookup page. An Index/Header rule populates the location for new organization records you create. Find this rule in Database → Rules under the name Organizations Index/Header. You can create this rule yourself if you don’t see it there. Your database may have been provisioned before this rule was included in new databases by default.
Creating the rule
Go to Database → Rules.
Select New Rule.
Configure the following settings:
Name: Organizations Index/Header
Base: Organizations
Rule Type: Index/Header
Folder: Keep rules organized by placing them in a folder. Select Other and enter a name to create a new folder.
Exclusivity Group: Enter
Index/HeaderNon-deterministic: Rule is deterministic and has an exclusive priority
Priority:
1Status: Active
Select Save.

Configure the rule action
Ensure the rule’s Action is set to Replace Values from Formula. We’ll create a subquery filter that returns a concatenated string in the following format: Address, State (if US), Country (if not US).
Create the Index-Header subquery filter
Create a Join to Address by Rank Overall, rank
1.Create a dependent Subquery Filter named
Index-Header.Set the Output to Concatenate, add
1as the Row Offset, and enter,as the Export Separator.Add a City export from the Address by Rank Overall base.
Create the State if US subquery export
Still in the
Index-Headersubquery filter, add a dependent Subquery Export calledState if US.Set the Output to Rank and add
1as the Row Offset.Add a Region export from the Rank Overall Region base.
Add a Country IN United States filter from the Address by Rank Overall base.
Select Save.

Create the Country if Not US subquery filter
Still in the
Index-Headersubquery filter, add a dependent Subquery Filter calledCountry if Not US.Set the Output to Rank and add
1as the Row Offset.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 filter.

Entering the formula
In the Formula field, enter
@Index-Header.Select Save to save the rule.
When you’re ready to test the rule, select Edit and set the Status to Active.
Testing the rule
After activating the rule, make an update to an organization record to trigger rules to run, which assigns the index field value. You’ll see the location appear when you search for this organization on the Records Lookup.
An update must be made to a record to add it to the rules queue. Perform a Retroactive Refresh on your organization records to assign the desired values to the index. Depending on the number of records that exist in your database, you may want to perform this refresh at a time when the number of users in the system will be at a minimum.