Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Padding an ID in workflow

Avatar

Avatar
Level 1
2DF-MSD
Level 1

Likes

0 likes

Total Posts

2 posts

Correct Reply

0 solutions
View profile

Avatar
Level 1
2DF-MSD
Level 1

Likes

0 likes

Total Posts

2 posts

Correct Reply

0 solutions
View profile
2DF-MSD
Level 1

03-05-2018

Hi,

I have a workflow that I am running in campaign that is reading values from a file and putting them in a temp table. The data I am reading has a customer ID, is there a way to pad this customer ID with zeros within the workflow? Like running a javascript, or what will be the best way to achieve this?

Thanks!

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 1
Employee
Vapsy
Employee

Likes

369 likes

Total Posts

726 posts

Correct Reply

342 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 250
View profile

Avatar
Validate 1
Employee
Vapsy
Employee

Likes

369 likes

Total Posts

726 posts

Correct Reply

342 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 250
View profile
Vapsy
Employee

03-05-2018

Hi 2DF-MSD,

You can certainly achieve that with the help of an enrichment activity on a workflow.

You can use the formula

LPad(<‘attribute that needs padding’>, <Number of characters in the final string after padding is applied>, <‘Character to use for padding at the BEGINNING if input text is smaller in length as compared to final output you want’>)

Or use

RPad(<‘attribute that needs padding’>, <Number of characters in the final string after padding is applied>, <‘Character to use for padding at the END if input text is smaller in length as compared to final output you want’>)

So in my test workflow I used

  • LPad([target/@account], 10, '0')
  • RPad([target/@account], 10, '0')

1479433_pastedImage_4.png

And here is the output

1479437_pastedImage_5.png

Regards,
Vipul

Answers (0)