Fields functions to extract part of data
Doc. / Help / For version: 8+
When you use data fields in different parts like saving email to a folder, or print email with fields, you can extract only a part of the data. That's useful when you have long string and want to get only a part like an email or an order number.
Example: You want to save email in folder using the email unique id, but it is very long %22456464xcvrg4vcv@sgdcv12%, you want to keep only the last 4 digits so you can use the function: RIGHT(%EMAIL_ID%, 4).
The available functions are:
- LEFT(field,X) = extract the X number of characters from the start (for example LEFT("Order received from King of Flowers", 5) return "Order")
- RIGHT(field,X) = extract the X number of characters from the end (for example RIGHT("Order received from King of Flowers", 7) return "Flowers")
- MID(field,X,Y) = extract the Y number of characters from the X position (for example MID("Order received from King of Flowers", 6, 8) return "received")
- REGEX() = use regular expressions to extract data, this function is particular and requires some computer skills. For more information on RegEx please check these sites:
https://blog.usejournal.com/regular-expressions-a-complete-beginners-tutorial-c7327b9fd8eb
https://regexone.com/
Here some basic examples to use REGEX in the fields:
- Extract all numbers in the email subject field:
REGEX(%EMAIL_SUBJECT%,([0-9]+))
- Exclude the characters FW: in subject of email:
REGEX(%EMAIL_SUBJECT%,[^FW:])

Information: fields, email, extract, right, left, middle, data - Updated the Wednesday, July 22, 2020