Users can search for dataset records in numerous places, such as in the top right search box of Slate or on a form using an autosuggest list for its dataset. By default, users can find dataset records by their:
-
- Name
- Key
Users may want to make dataset records searchable by values, in addition to showing information for other values. Users can customize this search using a dataset index/header rule. For instance, the above example demonstrates how Slate can show additional attributes about the dataset record, like its location and former name (which is a custom field).
The index/header information also appears when users click "Continued..." in an autosuggest list. The information is displayed in the "data" column:
Step 1. Create the Rule
|
Step 2. Configure the Rule
In the "Action" section, your next steps are to add one or more exports that will be used to search records by, and then reference them in the "Formula" setting. Optionally, you can add filters to your rule if some records should have different index criteria than others (this is not common).
We've outlined an example below for organization records.
Organization Record Example
In this example, we are looking to:
-
- Show address information. If the organization is in the United States, we want to output its city and state. If the organization is not in the United States, we want to output its city and country.
- Show its former name. We've created an organization-scoped field that allows us to enter the former name of an institution. By showing this, users can more easily find their school. Instead of using a field for storing an organization's former name, you can also store and use something like its aliases; for instance, allowing users to find George Washington University by storing "George Washington, GW, GWU" in this field
1. Join from "Organization" to "Address by Rank Overall" and enter "1" for the "Rank" setting. This will grab the overall rank 1 address for the dataset record. 2. Add a subquery export. 3. Specify a "Name", like "Index and Header". 4. Select the "Output" setting of "Concatenate". 5. Add the "City" export from the "Address by Rank Overall" join. 6. We want to output the address' state if it is in the United States; otherwise, we want to output the country. To do that we:
|
|
7. Ensure that you have entered ", " 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. 8. Though uncommon, you may want to output a new line that contains the former name of an organization, if the organization has one. In our example, we are storing the former name of a school using a custom organization-scoped field. To do that, we must:
|
|
9. Reference the "Index and Header" subquery export in the formula. 10. Save the rule. |
|
Step 3. Activating the Rule
- Activate the rule.
- Perform a Retroactive Refresh.
Tip On the Tables
Slate stores the person index on the [dataset.row] table in the [index] column, [dataset.row].[index].