String Operations

Prev Next

Following are the steps to configure String Operation:

  1. Select String Operation, click Configure and it opens String Operation for Attribute Value process window.

    On the left panel of the window displays starting and ending point with the source and target attributes selected, whereas the right panel displays the Source Attribute Data in tabular format and a Preview of Target Attribute displays preview of the newly applied operation.

  2. Click on   to open various operations supported by the system such as follows:

A screenshot of a computer  Description automatically generated with medium confidence

  1. Select the operation from the above list and click Save.

  1. Click Refresh Preview to view the latest data.

Once the configuration is successful, a green checkmark as Done gets displayed beside String Operation with options to View and Edit the configured string operation.

A screenshot of a screenshot of a text box  Description automatically generated

Now let’s look at each operator in detail.

Extract String

On selecting Extract String, there are two radio options displayed Delimiter based and Position based.

A screenshot of a computer  Description automatically generated

When user selects Delimiter based radio option, the following fields are displayed:

  • Delimiter: Select from a dropdown list of delimiters or use the custom option to create a new delimiter such as ‘..’ (double dots).

A screenshot of a computer  Description automatically generated with low confidence

  • Logic: Dropdown values could be either right of delimiter or left of delimiter. Right of delimiter means the operation will take place from the right of the delimiter whereas left of delimiter means the operation will take place from the left of the delimiter.

  • At occurrence count: Default value will be 1. This is the occurrence count for the delimiter, when there are multiple delimiters in the value it defines which occurrence should be considered. Basically, it defines the position from where you want to start the count with respect to the delimiter. For example, there are 2 delimiters present, then you need to define the value from which delimiter you want to perform string operation in this case enter value 2.

  • Direction: Dropdown values are Left to Right and Right to Left. If you want to calculate the position of the string from left, use Left to Right else Right to Left.

Now when user selects Position based radio option, the following fields are displayed:

  • Direction: Dropdown values are Left to Right and Right to Left. If you want to calculate the position of the string from left, use Left to Right else Right to Left.

  • Start position of string: Enter the integer value of the starting position of the string.

  • Length of the string: Enter the integer value of the total length of the string to be extracted.

Each operation has a Save and Discard operation icon as you see highlighted in the below screenshot.

A screenshot of a computer  Description automatically generated

If you save or discard changes, then only you will be able to add the next operation. Discard changes will discard the changes until the last save. You can add multiple operations within the start and the end point and then submit to save. You need to save the first operation to add the second operation.

Steps to create Extract String Operation:

1. Select the method and enter the details for each field (refer to the above for each field description).

2. Now click  to save the operation and click on Refresh Preview button to preview the changes.

3. If the result is as expected, click Apply or Save & Apply.

4. If you click Save & Apply, then the string operation is saved for you to reuse in future for other channels/catalogs.

Then a pop up to enter a name for string operation gets displayed.

5. Once you have entered the name, click Save and if you wish to make further changes click Cancel.

A screenshot of a computer  Description automatically generated

Then you will land on the Create Attribute Mapping page with Done (checkmark) next to the String Operation.

Add String

On clicking Add String, the following fields get displayed:

A screenshot of a computer  Description automatically generated with medium confidence

  • String to be added: Enter the string which needs to be added.

  • Method: The methods to remove string are Delimiter based, Position based, and String pattern based.

If you select Delimiter based the following fields gets displayed:

  • Delimiter: Select from a dropdown list of delimiters or use the custom option to create a new delimiter such as ‘..’ (double dots).

  • Logic: Dropdown values could be either right of delimiter or left of delimiter. Right of delimiter means the operation will take place from the right of the delimiter whereas left of delimiter means the operation will take place from the left of the delimiter.

  • At occurrence count: Default value will be 1. This is the occurrence count for the delimiter, when there are multiple delimiters in the value it defines which occurrence should be considered. Basically, it defines the position from where you want to start the count with respect to the delimiter. For example, there are 2 delimiters present, then you need to define the value from which delimiter you want to perform string operation in this case enter value 2.

  • Direction: Dropdown values are Left to Right and Right to Left. If you want to calculate the position of the string from left, use Left to Right else Right to Left.

If you select Position based the following fields gets displayed:

  • Add String from position is where you can enter the integer value of the starting position of the string.

  • Direction: Dropdown values are Left to Right and Right to Left. If you want to calculate the position of the string from left, use Left to Right else Right to Left.

A screenshot of a computer  Description automatically generated

Once you click to save the operation then other operations such as Move and Discard icon gets displayed. If you save or discard changes, then only you will be able to add the next operation. Discard changes will discard the changes until the last save. Move option will let you re-order the string and you can place it in any order you want.

You can add multiple operations within the start and the end point and then submit to save. You need to save the first operation to add the second operation.

Steps to create Add String operation:

1. Select the method and enter the details for each field (refer to the above for each field description).

2. Now click  to save the operation and click on Refresh Preview button to preview the changes.

3. If the result is as expected, click Apply or Save & Apply.

4. If you click Save & Apply, then the string operation is saved for you to reuse in future for other channels/catalogs.

Then a pop up to enter a name for string operation gets displayed.

5. Once you have entered the name, click Save and if you wish to make further changes click Cancel.

Remove String

When select Remove String operation, the following fields are displayed:

A screenshot of a computer  Description automatically generated

  • Method: The methods to remove string are Delimiter based, Position based and String pattern based.

If you select Delimiter based the following fields gets displayed:

  • Delimiter: Select from a dropdown list of delimiters or use the custom option to create a new delimiter such as ‘..’ (double dots).

  • Logic: Dropdown values could be either right of delimiter or left of delimiter. Right of delimiter means the operation will take place from the right of the delimiter whereas left of delimiter means the operation will take place from the left of the delimiter.

  • At occurrence count: Default value will be 1. This is the occurrence count for the delimiter, when there are multiple delimiters in the value it defines which occurrence should be considered. Basically, it defines the position from where you want to start the count with respect to the delimiter. For example, there are 2 delimiters present, then you need to define the value from which delimiter you want to perform string operation in this case enter value 2.

  • Direction: Dropdown values are Left to Right and Right to Left. If you want to calculate the position of the string from left, use Left to Right else Right to Left.

If you select Position based the following fields gets displayed:

A screenshot of a computer  Description automatically generated

  • Direction: Dropdown values are Left to Right and Right to Left. If you want to calculate the position of the string from left, use Left to Right else Right to Left.

  • Start position of string: Enter the integer value of the starting position of the string.

  • Length of the string: Enter the integer value of the total length of the string to be extracted.

If you select String Pattern based the following fields gets displayed:

A screenshot of a computer  Description automatically generated

  • String pattern to be removed: Enter the text which needs to be removed.

NOTE: This operation will remove the string entered if found in any part of the value. For example, the string to be removed is Usa and the word is Usage, it will be removed and what is left will be ‘ge’.

Once you click to save the operation then other operations such as Move and Discard icon gets displayed. If you save or discard changes, then only you will be able to add the next operation. Discard changes will discard the changes until the last save. Move option will let you re-order the string and you can place it in any order you want.

You can add multiple operations within the start and the end point and then submit to save. You need to save the first operation to add the second operation.

Steps to Remove String operation:

1. Select the method and enter the details for each field (refer the above information for each field description).

2. Now click  to save the operation and click on Refresh Preview button to preview the changes.

3. If the result is as expected, click Apply or Save & Apply.

4. If you click Save & Apply, then the string operation is saved for you to reuse in future for other channels/catalogs.

Then a pop up to enter a name for string operation gets displayed.

5. Once you have entered the name, click Save and if you wish to make further changes click Cancel.

Find and Replace String

On selecting Find and Replace String operation, the following fields gets displayed:

A screenshot of a computer  Description automatically generated with medium confidence

  • Replacement String is where you enter the string which you would want to replace.

  • Method: The methods to remove string are Delimiter based, Position based and String pattern based.

If you select Delimiter based the following fields gets displayed:

  • Delimiter: Select from a dropdown list of delimiters or use the custom option to create a new delimiter such as ‘..’ (double dots).

  • Logic: Dropdown values could be either right of delimiter or left of delimiter. Right of delimiter means the operation will take place from the right of the delimiter whereas left of delimiter means the operation will take place from the left of the delimiter.

  • At occurrence count: Default value will be 1. This is the occurrence count for the delimiter, when there are multiple delimiters in the value it defines which occurrence should be considered. Basically, it defines the position from where you want to start the count with respect to the delimiter. For example, there are 2 delimiters present, then you need to define the value from which delimiter you want to perform string operation in this case enter value 2.

  • Direction: Dropdown values are Left to Right and Right to Left. If you want to calculate the position of the string from left, use Left to Right else Right to Left.

If you select Position based the following fields gets displayed:

  • Direction: Dropdown values are Left to Right and Right to Left. If you want to calculate the position of the string from left, use Left to Right else Right to Left.

  • Start position of string: Enter the integer value of the starting position of the string.

  • Length of the string: Enter the integer value of the total length of the string to be extracted.

If you select String pattern based the following fields gets displayed:

  • String pattern to be removed: Enter the text which needs to be replaced in the Replace textbox and new text next to with textbox.

Note: You can select to match by case which is ‘Apple vs apple’ or match the whole word which is 'usa  vs usage'. You can add multiple Find & Replace criteria.

Once you have entered all the information for the operation, click Save and then click on Refresh Preview button to preview the changes.

Once you click to save the operation then other operations such as Move and Discard icon gets displayed. If you save or discard changes, then only you will be able to add the next operation. Discard changes will discard the changes until the last save. Move option will let you re-order the string and you can place it in any order you want.

You can add multiple operations within the start and the end point and then submit to save. You need to save the first operation to add the second operation.

Convert Case

Once you select Convert Case operator for the selected source attribute, you need to select the format in convert case section. The options available are UPPER CASE, lower case, Sentence case, and Camel Case.

Then click to save the operation and click on Refresh Preview button to preview the changes.

A screenshot of a computer  Description automatically generated with medium confidence

NOTE: Convert case is only applicable to text strings.

Thousand Separator

When you select the operator Thousand Separator, you can remove or add a thousand separators to the source attribute data. Examples of separators are comma (,), full stop (.), greater/less than (<,>), semi-colon (;) etc.

A screenshot of a computer  Description automatically generated

Steps to Add/Remove the separator:

  1. Select Add/Remove separator radio option.

  2. Enter the separator you wish to add or remove from the string and click Save Operation.

    Once the separator is saved successfully, a pop up as “String function is saved successfully” gets displayed.

  3. You can view the latest applied changes on the right side of the panel by clicking on Refresh Preview button.

Let us consider an example where we will add a comma separator to an integer value.

  1. Adding a comma in text box as displayed below and clickSave.

Once the separator is saved successfully, a pop up as “String function is saved successfully” gets displayed.

A white rectangular object with black lines  Description automatically generated

  1. Click Refresh Preview and the changes will be reflected as shown below:

A screenshot of a facebook profile  Description automatically generated

  1. Click Save & Apply to save the entire string operation.

Remove Separator:

Let us consider an example where we remove the added separator comma from the integer value.

  1. Select Remove separator radio option.

  2. Enter the separator comma (,) and click  Save.

    Once the separator is saved successfully, a pop up as “String function is saved successfully” gets displayed.

A white rectangular object with black lines  Description automatically generated

  1. On saving the operation and click Refresh Preview, the changes will be reflected as shown below:

A screenshot of a facebook profile  Description automatically generated

  1. Click Save & Apply to save the string operation.

Handle Negative Values

When there is negative (-ve) values such as (-5) or parenthesis [(5)] in the source, it helps to identify such values by adding a minus or parenthesis to the values.

A screenshot of a computer  Description automatically generated

The fields display under Handle negative values are as follows:

  • Logic to identify negative values in source consists of dropdown values- Minus sign ( - ) to the left of the value, Minus sign ( - ) to the right of the value, Values enclosed in parenthesis.

  • Logic to populate negative values in target consists of dropdown values- Minus sign ( - ) to the left of the value, Minus sign ( - ) to the right of the value, Values enclosed in parenthesis.

Once you select the values for each field, click to save the operation and click on Refresh Preview button to preview the changes.