Customizing the Omni Search

Customizing what can be searched on and displayed in the database's Omni Search tool will be key to your Slate productivity. 

The Omni Search is a partial word search across multiple sections in the database. This can include records, datasets, queries, forms, and imports. By default, the data points used by the search for person records are the record name, email address, phone number, social security number, and the Slate Reference ID. For dataset records, the default is name and key. 

The default information displayed along with the name in search results for person records is the Slate Reference ID, and Date of Birth. There is no default information for dataset records other than the name.  

The Omni Search

Customizing the Omni Search for Person Records

Rules in Slate are used to customize the search criteria for a person record. Note: any new search criteria will be in addition to the default search criteria.  

1. Navigate to the Rules tool inside of Database.

2. Click "New Rule."

3. Enter a "Name."

4. Select "Configurable Joins - Person" for the Base setting.

5. Select "Person Index" for the Type setting.

6. Specify a "Folder," if desired.

7. Set a "Priority," such as "1" if this is your only Person Index rule.

8. Set "Status" to "Preview."

9. Click "Save."

customize the search criteria for a person record

In the Filter section of the rule, filters can be applied to tell the rule which records can be searched by the new criteria. If the rule will apply to all person records the filter section can be left blank. 

The Action section is where any new searchable criteria will be added. With the Action of Replace Values from Formula selected there are two sections: Exports and Formula.  

Adding a single search criteria

When only a single searchable criteria needs to be added, add the export for that criteria to the export section.  The export will need to be SQL friendly.  Any spaces in the Export name will need to be removed or filled in a value (using an underscore for example).  

 

When only a single searchable criteria needs to be added
With the export name configured without any spaces, the export can be added to the formula section with an @ symbol appended before the export name.  
the export can be added to
  the formula section

 

Adding multiple searchable data criteria

For simplicity, using a subquery export to combine multiple search values makes creating the formula straightforward.

When combining multiple values in a concatenate SQL statement, it is important to know that if any one of the values is null (blank), the result of the concatenation will also be null. Using a subquery export will take this into account so you do not have to code this into your formula.  

In a subquery export, multiple exports can be added. Give the subquery export a SQL-friendly name that does not have any blank spaces. Select the Output setting of Concatenate. Add the exports for the searchable data criteria. Since these exports are contained in the subquery export their export names can have blank spaces. 

Between each export add a literal value of a semicolon. The semicolon will let Slate know when one searchable value ends and the other begins.  Without the semicolon, all the values would run together and would be able to be searched independently.   add a literal value of a semicolon
Once the subquery export is created, the subquery export value can be added to the formula section.  As above append the subquery export name with an @ symbol.   the subquery export value can be added to
  the formula section

Applying the new search criteria to person records

To apply the new search criteria to person records the rule needs to run for those records. Rules run for any person records that have been updated. To update person records in batch a query can be used. One of the query Outputs is called a Retroactive Refresh in the context of the query this will apply an update to any record returned into the query. The rules will then begin to process. This can take roughly 15 minutes, however, the more records updated at the same time the longer it takes for the rules to process.  

  1. A query can be run directly from the Person Index rule you have created, or a query can be created in the query tool.
    1.  From the rule, on the right-hand side, there is a link called New Query. This link will generate a query with any filters that have been added to the rule. The exports chosen here do not matter, however, to run a query, at least one export is required.
    2. Open the Query Builder and create a Quick Query or New Query. In this query, filter for the records that would need rules to run for them. If this is all records in the database no filters are necessary. The exports chosen here do not matter, however, to run a query, at least one export is required.
  2. Select "Output >> Batch Management >> Retroactive Refresh."
  3. Click 'Export.'
  4. Click 'Submit.'

Customizing the Omni Search Display Information for Person Records

Person header rules in Slate are used to customize the default information displayed along with the name in the search results for person records. When thinking through the information to display remember space is limited. It is best to only display the information necessary to differentiate records that may have the same name. 

Note:  When a new custom rule is created, and a record meets the rule criteria the default information of Slate Reference ID, and Date of Birth will not display and will be replaced by the new custom rule criteria.  If a person's record does not meet the criteria, then the default information of Slate Reference ID and Date of Birth will display.  

1. Navigate to the Rules tool inside of Database.

2. Click "New Rule."

3. Enter a "Name."

4. Select "Configurable Joins - Person" for the Base setting.

5. Select "Person Header" for the Type setting.

6. Specify a "Folder", if desired.

7. Set a "Priority", such as "1" if this is your only Person Index rule.

8. Set "Status" to "Preview."

9. Click "Save."

display the information necessary to differentiate records

In the Filter section of the rule, filters can be applied to tell the rule which person records can display the new custom information. If the rule will apply to all person records the filter section can be left blank. 

The Action section is where any new display information will be added. With the Action of Replace Values from Formula selected there are two sections, Exports, and Formula.  

Note: When combining string values in a formula, it is important to know that if any one of the values is null (blank), the result of the concatenation will also be null. The use of subquery exports will take the null values into account. Else the SQL 'isnull' function will need to be used in the formula. 

Below will be two examples, one using subquery exports, and the other using 'isnull' in a formula to display a customer Constituent ID field, and a Class Year field.  

Subquery Exports

Using a subquery export, additional exports can be added with filters applied to display the different aspects of the information when that information exists on the record. additional exports can be added with filters
For the Constituent ID a subquery export a layer deep is used to build all the components around what should be displayed in the Omni Search if a record has a Constituent ID. In the subquery export for Constituent ID, a literal is added that is 'ID: ' for formatting, and the export for the Constituent ID field is added.  a subquery export a layer deep is used
A filter is added that us using the Aggregate of Exists, followed by the export for the Constituent ID. With this configuration, the Constituent ID values will not display if the record does not have a Constituent ID. 
A filter is added that us using the Aggregate of Exists
The same is repeated for the class year, and the pipe delimiter ( | ). For the pipe delimiter, the filter existence is for both a Constituent ID and class year, as the pipe would not matter if only one of those values existed on the record.   the pipe delimiter

 

The end result, if a record had both a Constituent ID and class year, would be "ID: 123456789 | Class Year: 1997".

Formula SQL

Similar to the subquery option, the exports for Constituent ID and class year are added, making sure to edit the names of the export to be SQL friendly (blank space removed and replaced with an underscore).  The isnull SQL function will ensure the ID: will not display if there is no value in the Constituent_ID export.  

isnull('ID: ' + @Constituent_ID , '') + isnull('Class Year: ' + @Class_Year , '')

the exports for Constituent ID and class year are added

Customizing the Omni Search for Dataset Records

Rules in Slate are used to customize the search criteria for a dataset record. Note: any new search criteria will be in addition to the default search criteria of name, and key.

Unlike the person records, dataset index and header rules are a single rule. This means that any value setup as a header would also be searchable, and vice versa.  

A database can have multiple datasets, each dataset can have its own Index/header rule. When the base is selected for the rule, the base will determine which dataset the Index/Header rule will be first.  

1. Navigate to the Rules tool inside of Database.

2. Click "New Rule."

3. Enter a "Name."

4. Select the "Configurable Joins - . . ." option for the Base setting that corresponds to the dataset you are building the rule for.

5. Select "Person Index" for the Type setting.

6. Specify a "Folder", if desired.

7. Set a "Priority", such as "1" if this is your only Person Index rule.

8. Set "Status" to "Preview."

9. Click "Save."

the base will determine which dataset the Index/Header rule will before

In the Filter section of the rule, filters can be applied to tell the rule which dataset records can be searched on and display the new custom information. If the rule will apply to all dataset records the filter section can be left blank. 

The Action section is where any new display information will be added. With the Action of Replace Values from Formula selected, there are two sections: Exports and Formula.  

Note: When combining string values in a formula, it is important to know that if any one of the values is null (blank). The result of the concatenation will also be null. The use of subquery exports will take the null values into account. Otherwise, the SQL 'isnull' function will need to be used in the formula. 

Below will be two examples: one using subquery exports and the other using 'isnull' in a formula to display a general ledger number of the fund and the fund restriction status. 

Subquery Exports

Using a subquery export, additional exports can be added with filters applied to display the different aspects of the information when that information exists on the record.

Create a subquery export with an SQL-friendly name. Add in the exports that you want to be both searchable and displayed. Note: Since both the index and heard are combined, any formatting applied will be searchable. In the example below, the literal of GL Number is searchable.

Add the export values that are to be displayed and searchable. In the example below, a literal 'GL Number: ' is added for formatting, and the export for the Fund GL Number field is added. A literal of a pipe is used as a delimiter, followed by the export for the Fund Restriction field.  

Add the export values

Formula SQL

Similar to the subquery option, the exports for fund GL number and restriction status are added, making sure to edit the names of the export to be SQL friendly (blank space removed and replaced with an underscore). The isnull SQL function will ensure the GL Number: will not display if there is no value in the Fund_GL_Number export.

isnull('GL Number: ' + @Fund_GL_Number , '') + isnull(@Fund_Restriction , '')

exports for fund GL number and restriction status are added

 

Was this article helpful?
0 out of 0 found this helpful