codeRule action: Split text

circle-info

Used for: splitting up the content of a field on a certain character or word, and then using one or more of the parts of the split content.

Used in: "THEN"-statements and "ELSE"-statements.

The "split text" rule splits up a field every time a character or word of your choice appears in that field. By using the split text rule you basically cut up a field into several parts. You can then select one or more of these parts to fill a field of your choice.

An example: let's say your descriptions contain the size of your products. You can use the split text rule to fill the "size" field with the part that comes after the word "size:" in your description.

1

Step: First split — extract everything after "size:"

Use the "split text" rule to split the description on the word "size:" and then select the part that follows it to fill the "size" field.

This will set the size field to the entire second part (everything after "size:").

split text example step 1
2

Step: Second split — refine to just "XL"

If the second part still contains extra text (for example: "XL, other info"), add another "split text" rule on the newly populated "size" field. Split on the comma and select the part before the comma (first part) to get only "XL".

This additional step refines the size field to the exact value you want.

split text example step 2

Last updated

Was this helpful?