These rules allow you to normalize or standardize your data based on a specific criteria. Transform Rules are applied in the Brushr module but the rule itself can be managed in Supervisr module.
To Create a new rule, press the ADD RULE button. This will open the Rule Dialogue window, which consists of 3 sections.
- The left hand-side of the screen allows users to specify a rule name and description and add fields to be used in a rule.
- The Rules Designer section contains a list of optional blocks on the left that can be dragged into the designer work area on the right to build rules.
- The Rule Preview window below displays the results of the rule with sample data.
TIP: Any changes to the rule can be immediately observed in the Preview area. A flag next to the Rule Preview label will automatically display the validity of the current rule.
The following blocks are available in the Rules Designer:
- Format
- Format phone number (E164, International, National or RFC3966). Automatically detects Country based on a record
- Format country (Full Name, Abbreviate to 2 letters or 3 letters)
- Format state (Full Name or Abbreviate to 2 letters). Automatically detects Country based on a record
- Format special (ZIP Code, Social Security Number, Employee Identification Number, Credit Card Number)
- Format URL (Strip protocol, change to HTTP or HTTPS, strip www, strip trailing slash, strip hash)
- Text
- Change case to (UPPERCASE, lowercase and Proper Case)
- Find "TEXT" and replace with "TEXT"
- Create text - can be used to concatenate multiple values into one
- Logic
- If/Else Do
- Compare values (equals, not equal to, less than, greater than, less or equal, greater or equal, contains, does not contain, starts with, ends with)
- And/Or
- Is empty
- Not
- Values
- Text
- Boolean (True/False)
- Empty
- Number
- Now - returns current date and time
- regex - When used with Find and Replace, the regex rule can be used to create custom logic that extracts character strings from texts and many other possibilities.
In this example, a Find and Replace rule combined with a Regex Rule is able to extract extensions from a phone number
- Fields
- Set field value to - assigns a value to the field the rule is applied to
- Field value - returns a value of the field the rule is applied to
- Specified field value - returns a value of the selected field
- Math
- Add
- Subtract
- Multiply
- Divide
- Round up or down to the nearest whole number
- Date
- Add or subtract specified amount of time to date field
Note: In the preview panel transformation is applied only to specific fields, you may use fields toggles to select which fields should be enabled for preview of before and after values.
Tip: To activate transform rule, associate it to a field in a dataset. Learn more:
Transform Rule: Associate to a field in a dataset
Press SAVE to create the rule or Cancel to exit without saving.