Introduction
As part of our Value Transforms functionality, we offer the ability to perform Regex Find and Replace.
Advanced Value Transforms and Manipulations is an extension of the value transform process that allows you to manage, edit and transform data efficiently and for unique cases. Please click here to view the article on creating a simple Value Transform.
This section focuses on the Trim function, which allows you to automatically trim data. Please click here to view the Find and Replace functionality.
Setup Process
1. Within a campaign, click the Admin menu and select Value Transforms.
2. Enable Value Transforms by using the toggle.
3. On this page, select Add.
4. Here, you'll need to fill out each field:
- Label: A name for the Value Transform
- Original Fieldname: the field you are looking to reformat
- New Fieldname: the field we will store your reformatted value in
- Order: This will dictate when this Value Transform should run, in relation to any other transformations set up in the campaign. By default this is 0, meaning that it will run first. Increasing the order changes when it will run.
5. You will need to select Manipulate. This will give you a type dropdown, where you can select Regex Find and Replace.
6.a. Trim
The Trim functionality will remove any spaces from any value submitted under the given field. Select Trim from the Type dropdown menu. This function will remove any excess spaces inputted on the start or the end of any value.
i. To add Trim to your transformation, select the Type Trim and click Add
As shown in the Preview input, spaces are trimmed from the value.
6.b. Trim Start
The Trim Start functionality will remove a stated value from the given form field.
i. To add Trim Start to your transformation, select the Type Trim Start
ii. Enter the value you would like to trim from every value in the Value box and click Add
Your setup is complete from here! You'll be able to use the Preview at the bottom to check that it reformats as intended:
6.c. Trim End
The Trim End functionality will remove a stated value from the given form field.
i. To add Trim End to your transformation, select the Type Trim End
ii. Enter the value you would like to trim from every value in the Value box and click Add
Your setup is complete from here! You'll be able to use the Preview at the bottom to check that it reformats as intended:
7. Click Save.