Custom Dataset Rules
  • 10 Apr 2024
  • 4 minute read
  • Dark
    Light
  • PDF

Custom Dataset Rules

  • Dark
    Light
  • PDF

Article Summary

☑️ Prerequisite Skills

Custom Datasets, Rules

In Slate, pre-made rules run in the background to facilitate the search and identification of records. When you create a custom dataset, those rules need to be created along with it. Some functions of these rules include:

  • Setting the record's Display Name

  • Assign new records a Dataset Record Key

  • Customize the information displayed in search auto-suggestions with a Dataset Index/Header 

Display Name Rule

When you first create a custom dataset, one of the only fields that Slate creates for you is Name (sys:name). Information stored in this field is displayed as the header of your dataset record as it's being viewed. Depending upon your dataset, you may need to populate the Name field with a display name rule.

Do I need a Display Name Rule?

If your custom dataset represents a building, a class, an organization (for example, a company, church, or foundation), or anything with only one name, you likely set the Name field when creating the record. In this case, a display name rule is not needed.

A picture of a custom dataset record with the display name Intro to Quantum Mechanics.

Determine whether you need a display name rule by editing your dataset record creation form and checking whether you have a text box field mapped to Record > Name (sys:name). If your custom dataset represents a human, you might have created custom fields for First Name and Last Name, or other data points that you might want to be displayed in the record's header, like Prefix or Title. In this case, you will need a Display Name Rule. 

Creating the Display Name Rule

To create the display name rule for a custom dataset record:

  1. From the main navigation, select Database.

  2. Under Automations, select Rules Editor.

  3. Click New Rule. A popup appears.

  4. Configure the following settings:

  • Name: Enter a descriptive, human-friendly name, such as Volunteer Dataset Display Name.

  • Base: Configurable Joins - [Your Custom Dataset] (in this example, Volunteers)

  • Type: Name

  • Folder: Place the rule in a folder consistent with your existing rule folder structure. If you aren't sure what folder to put this rule in, create a new folder named after your custom dataset to store all the rules for that dataset.

  • Exclusivity Group: Your rule is automatically placed in the Name exclusivity group.

  • Non-deterministic: Rule is deterministic and has an exclusive priority.

  • Priority: 1

  • Status: Inactive or Preview

Custom_Dataset_Display_Name_Rule.png


  1. Click Save. You are redirected to the rule configuration page.

  2. Add any necessary filters to the rule. If every record should be affected by this rule, no filters need to be added.

  1. Set Action to Replace Values from Formula.

  2. Click Export.

  3. Select the fields that you will use to generate your display name.

  4. Double click an export. Rename it to be computer-friendly: for example, First Name becomes first. Repeat for each export.

  5. In the Formula field, enter a calculation formula using your exports as the variables. For records with a first and last name, a basic calculation is:

    isnull(@first + ‘ ‘, ‘’) + isnull(@last, ‘’)
  6. Click Save. You are redirected to the All Rules page.

  7. Select the rule from the list.

  8. Click Edit.

  9. Set Status to Active.

Rule_Action_-_Replace_Values_from_Formula___Formula.png

Retroactive Refresh

If records in this custom dataset already exist in your database, perform a Retroactive Refresh to execute the rule on those records.

  1. On the rule configuration page, select New Query at the right. You are redirected to a Quick Query page.

  2. Click Export. Add at least one export.

  3. Click Run Query.

  4. Under Output, select Retroactive Refresh.

  5. Click Export. A confirmation appears.

  6. Click Submit. On the system dialog, click OK.

Retroactive_Refresh_-_New_Query___Run_Query.png

Retroactive Refreshes ensure any custom dataset records that meet the rule criteria are queued to run through this rule and have their display name updated accordingly.

Custom Dataset Key Rule

If you do not assign your custom dataset key as a part of the custom dataset's new record form, you can assign a key using a rule.

Creating a Custom Dataset Key Rule

To create a custom dataset key rule for a custom dataset record:

  1. From the main navigation, select Database.

  2. Under Automations, select Rules Editor.

  3. Click New Rule. A popup appears.

  4. Configure the following settings:

  • Name: Enter a descriptive, human-friendly name, such as Assign Volunteer Dataset Key.

  • Base: Configurable Joins - [Your Custom Dataset] (in this example, Volunteers)

  • Type: Key

  • Folder: Place the rule in a folder consistent with your existing rule folder structure. If you aren't sure what folder to put this rule in, create a new folder named after your custom dataset to store all the rules for that dataset.

  • Group: Your rule is automatically placed in the Key exclusivity group.

  • Non-deterministic: Rule is deterministic and has an exclusive priority

  • Priority: 1

  • Status: Inactive or Preview

Custom_Dataset_Key_Assignment_Rule.png


  1. Add any necessary filters to the rule. If every record should be affected by this rule, no filters need to be added.

  1. Set Action to Replace Values from Formula.

  2. Click Export.

  3. Select the field that will be assigned as the custom dataset records' new key. For example, to set the key to be the Slate-assigned unique Identity value, select the Identity export.

  4. Double-click the export. Rename it to be computer-friendly: for example, Volunteer Identity becomes identity.

  5. In the Formula field, enter an @ followed by the export name. For the Identity example, where there is guaranteed to be a value in the field, you can use the following basic formula:

    @Identity
  6. Click Save. You are redirected to the All Rules page.

  7. Select the rule from the list.

  8. Click Edit.

  9. Set Status to Active.

Assign_Key_Rule_Action_-_Replace_Values_from_Formula___Formula.png

Retroactive Refresh

If records in this custom dataset already exist in your database, perform a Retroactive Refresh to execute the rule on those records.

  1. On the rule configuration page, select New Query at the right. You are redirected to a Quick Query page.

  2. Click Export. Add at least one export.

  3. Click Run Query.

  4. Under Output, select Retroactive Refresh.

  5. Click Export. A confirmation appears.

  6. Click Submit. On the system dialog, click OK.

Key_Assign_Rule_Retroactive_Refresh_-_New_Query___Run_Query.png

Retroactive Refreshes ensure any custom dataset records that meet the rule criteria are queued to run through this rule and have their key updated accordingly.

Dataset Index/Header Rules

For information about setting the Dataset Index/Header Rule, which affects how both internal and external users of Slate search for and view dataset records, see the dedicated article on Dataset Index/Header Rules.


Was this article helpful?