- 11 Nov 2024
- 8 minute read
- Print
- DarkLight
- PDF
Customizing Person Record Search Criteria with Person Index/Header Rules
- Updated 11 Nov 2024
- 8 minute read
- Print
- DarkLight
- PDF
Users can search for a Person Record in the Lookup tool or the Omni Search. By default, users can find Person records by searching for their:
Name,
Slate Reference ID, or
Email Address
This criteria is known as the record’s index.
When using the Omni Search, information known as the header displays below the record’s name. By default, this includes:
Slate Reference ID, and
Date of Birth in MM/dd/yyyy format (Month/Day/Year).
Display: Person Header
When using the Omni Search, the Person record’s name will be displayed prominently, alongside some additional information below the name that can be helpful in distinguishing between multiple Person records with the same or similar names. By default, the Reference ID and Date of Birth for that record will be displayed below their name. This information is known as the header.
If a Person record has one or more Applications associated with it, information for the Rank 1 Application will be displayed below the header.
How can I change the application information in the Omni Search?
The application information displayed is determined by the application’s own header. More information on application headers can be found in the Application Header Rules article.
Search: Person Index
Slate administrators may want to change the values they and their users can use to find Person records in the Lookup tool and Omni Search. For example, many schools use an external SIS ID rather than the Slate Reference ID as a unique identifier. The searchable information for any given record is known as its index, and it can be changed using a Person Index rule. Regardless of any changes you make to the index, Person records can always be found by searching for their name, Slate Ref ID, or email address.
Configuring Person Index and Header Rules
Person Index and Header values can’t be changed manually; they must be set using rules. Whether you are updating the Index or Header, the same basic instructions are used to construct the rule, with only the' ‘Type’ of the rule changing to ‘Person Index’ or ‘Person Header,’ respectively. These values won’t update immediately, but will update the next time the rules are run on eligible records. You can also force records to run through the rules using a Retroactive Refresh, but do so responsibly! Running a Retroactive Refresh on a large number of records can lead to database slowdowns.
Step-by-Step: Building an Index or Header Rule
Navigate to the Rules tool inside of Database.
Select New Rule
Enter a Name, such as "Person Header Rule".
For Base, select "Configurable Joins - Person".
For Type, select "Person Index" for an Index rule, or "Person Header" for a Header rule.
Specify a Folder, if desired.
Set a Priority. This must be an integer (whole number) of 1 or higher. Index and Header rules must be in an exclusivity group, even if there is only one rule of that type. See Exclusivity Groups for more information on this setting.
Leave Status set as "Inactive".
Click Save. Slate will redirect you to the page to configure the rule.
Apply any desired filters to your rule. This is only applicable if the Index/Header should only be updated for a subset of records.
Adjust the Action setting to "Replace Values from Formula”. This will allow you to leverage Configurable Joins to build your new Index/Header value.
Add any desired/needed joins and exports. It is recommended to construct a single subquery export with the data you would like to return, to avoid the need for complex formulas.
Enter a valid formula into the Formula text box. Exports can be referenced using the
@
symbol, and will appear in a selectable autocomplete list when that symbol is typed in the text box. If you have constructed a subquery export to return your entire desired Index/Header value, your entire formula will be:@Your-Subquery-Export-Name
Rule Formulas are written using simple SQL functions. For more information on formulas, see Rule Formulas.
Using the “Replace Values from Custom SQL” action setting is not recommended.
Click Save. This will save all the changes you have made to the rule thus far, and redirect you to the Rules Editor main page.
Best Practice: Re-provision your Test Environment or use Suitcase to copy over your newly-created rule. Proceed with the following steps in Test first, to ensure that your rule is working as intended.
Locate your rule in the Rules Editor, and select it to make additional changes.
Select Edit in the top-right corner of the screen.
Change the Status to “Active”.
Run a Retroactive Refresh on a sample of Person records, ensuring the Index/Header updates correctly.
You can confirm changes to the header by looking up a record in the Omni Search and observing the text that appears below the record’s name.
You can confirm changes to the index by looking up a record in the Lookup Tool or Omni Search with the search terms (export) you configured in your Index rule. Remember that Name, Slate Reference ID, and Email Address are always searchable.
Example: Person Header
We've outlined an example below to replace the Person Header information with Birthdate and Address, and Rank 1 School Name.
In this example, we are looking to:
Show address information. If the Person is in the United States, we want to output their city and state. If the Person is not in the United States, we want to output their city and country.
Show the Person record's birthdate. This is included in the default Header, but needs to be added to the replacement Header since no information from the default Header will be shown once a replacement Header is set.
Show the Person record's Rank 1 School Name.
Create Joins
In the Action section, create a Join from "Person" to "Address by Type, Rank." Choose "Permanent Address" from the Type select list, and enter "1" for the Rank setting. This will grab the rank 1 permanent address for the Person record. Click Save to continue.
Create an additional Join from "Person" to "Schools". Add a Sort for "Rank Overall," with the default order of Ascending (
asc
). If you only want a specific type of school displayed, such as High School, you can add a Type filter to the Join. Otherwise, click Save to continue.
Add the City, State/City, Country export
Add a subquery export. The Edit Part pop-up window will open.
Set the Name for the subquery export to "location."
Select the Output setting "Concatenate".
Enter
,
as the Export Separator. This causes your chosen separator (in this case, a comma follow by a space) to dynamically appear after each export, if there is an export that follows it.Add the "City" export from the "Address by Type, Rank" Join.
We want to output the address state if it is in the United States; otherwise, we want to output the country. Add a nested subquery export by clicking the subquery export icon within the open Edit Part pop-up window. A new pop-up will open to configure the subquery export.
Under Exports, add the Region export from "Address by Type, Rank". Under Filters, add the "Country" filter set to IN "United States". Slate will only return a value in this subquery export if the address is in the United States. Add a name, such as "region," and click Save to close this pop-up window.
Add another nested subquery export by clicking the subquery export icon. A new pop-up window will open.
Under Exports, add the "Country" export from "Address by Type, Rank". Under Filters, add the "Country" filter set to
NOT IN "United States"
. Slate will only return a value in this subquery export if the address is not in the United States.Click Save.
Check that your "Location" subquery export appears similar to the screenshot on the right. It should be configured with the Output type "Concatenate", have ", " as the Export Separator, contain the export for City, and contain two nested subquery exports (one for region, one for country). Once you're ready, Click Save to close the pop-up window.
Add the Birthdate export
In the Action section, add the Birthdate export from the Person base.
Double-click the export, named "Person Birthdate" by default, to edit it in the Edit Part pop-up window.
Rename the export to "birthdate," and set a Format Mask for the date's appearance in the Format Mask text box. Setting the Format Mask to "dd-MM-yyyy" will return the birthdate in standard American format with leading zeroes (ex. January 2, 1999 will display as "01-02-1999").
Click Save to close the pop-up window.
Add the School Name export
Add a new subquery export. The 'Edit Part' pop-up window will open.
Set the Name to "school".
Select the Output setting "Concatenate." Leave the remaining settings as their defaults.
Under Exports, add a Literal with the name "New Line" and the Literal value set to "\n". This will create a new line before the school name.
Add the "Name" export from the "Schools" Join.
Click Save to close the pop-up window.
Combine the Exports
Confirm your exports under the Action section of your rule match the exports in the screenshot to the right. You should have 2 Joins (to "Address by Type, Rank" and "Schools") and 3 Exports ("location", "school", and "birthdate").
In the Formula text box, enter the following SQL formula:
ISNULL(@birthdate + '; ', '') + ISNULL(@location, '') + ISNULL(@school, '')
This formula will check for missing values in the exports before combining them all into the Person record's Header.
Step 3. Activating the Rule
Activate the rule.
Result
Tips
Filters & Exclusivity Groups: Multiple Headers & Indexes
You can add filters to your rule if some records should have different indexes or headers than others; each separate index/header will require its own rule in the respective Exclusivity Group. This is not common, but may be helpful in a database that is shared between different campus departments. Be sure to review our documentation on Exclusivity Groups if you’re not familiar with their use.
Rule Formulas
Index and Header rules do not typically require the use of custom formulas; almost any configuration can be accomplished using a single subquery export. Once a subquery export has been configured, it can be referenced in the Formula text box using the @
symbol.
For those rare cases where a more complex formula is helpful or required, see Rule Formulas.