splitting a number in workflow to update in a table | Community
Skip to main content
Level 2
October 28, 2024
Solved

splitting a number in workflow to update in a table

  • October 28, 2024
  • 1 reply
  • 860 views

I have a csv file with a number that has 17 characters. I want to include 13 in a table, disregarding some at the beginning and end. Is there a way to do this in a workflow without touching the file?

Best answer by SatheeskannaK

@ccg1706 Yes, your approach is correct.

@fernandac322631 

After the load file activity have an enrichment that does the transformation on the data to split the number using the substring function and use that in the update activity to update the table.

Here is the sample expression if the incoming number (crmid) is a string data type.

Let's assume crmid value is 123456789 and using the substring function below,

Substring(crmid, 2, 4)+Substring(crmid, 7, 1)
Result is 23457

https://experienceleague.adobe.com/en/docs/campaign-standard/using/managing-processes-and-data/filtering-data/list-of-functions

1 reply

ccg1706
Community Advisor
Community Advisor
October 28, 2024

Hi @fernandac322631 ,

 

I share with you an Adobe doc link.

 

You can do a workflow in order not to touch the file, following the next steps regarding activities:

-Load file activity: It will load your file into a temporary table.

-Enrichment: Here in the Additional data tab it will be necessary to ad a calculated field to transform the 17 character field by extracting the required 13 characters.

-Creating the calculated field: Here we can manage two options, using substring function or doing a JavaScript.

-Map the field correctly to the target table through an Update Activity.

-Test it to be sure, that works correctly.

 

Regards, 

Celia

 

 

 

 

 

 

SatheeskannaK
Community Advisor
SatheeskannaKCommunity AdvisorAccepted solution
Community Advisor
October 28, 2024

@ccg1706 Yes, your approach is correct.

@fernandac322631 

After the load file activity have an enrichment that does the transformation on the data to split the number using the substring function and use that in the update activity to update the table.

Here is the sample expression if the incoming number (crmid) is a string data type.

Let's assume crmid value is 123456789 and using the substring function below,

Substring(crmid, 2, 4)+Substring(crmid, 7, 1)
Result is 23457

https://experienceleague.adobe.com/en/docs/campaign-standard/using/managing-processes-and-data/filtering-data/list-of-functions

Thanks, Sathees