Expand my Community achievements bar.

Dive in, experiment, and see how our AI Assistant Content Accelerator can transform your workflows with personalized, efficient content solutions through our newly designed playground experience.
SOLVED

Need to change the format based on variable field.

Avatar

Level 2

Hi All,

 

Requirement:  Need to populate the dynamic/variable information in X.XX % design in the email creative. On the off chance that, variable field have X.X% then, at that point, need to add '0' and make design X.XX % in any case keep the first arrangement X.XX%.

 

for e.g., if data is coming from source, have 4.5 then need to make 4.50 %.  in case, it is coming 4.50 then need to keep as it is 4.50%.  

Field/ column is string.  

 

regarding 0%, tried to apply direct concat but it is also not working as well. 

 

{%=concat(xyz field,"0%") %}

xyz column- coming from custom actions

 

Thanks. 

1 Accepted Solution

Avatar

Correct answer by
Employee

@SumanTiwari 

You can use the following helper function

{%= toPrecision(4.5, 2) %}%

View solution in original post

6 Replies

Avatar

Community Advisor

@SumanTiwari - is this question related to Workfront or another Adobe Product? I'm not sure I understand where you are looking to do this Workfront so it's leading me to think it's a different product.

 

Thanks for clarifying.

 

 




Avatar

Level 2

it is related to AJO. Can you move this or let me know if I need to raise in AJo community? 

Avatar

Correct answer by
Employee

@SumanTiwari 

You can use the following helper function

{%= toPrecision(4.5, 2) %}%

Avatar

Level 2

Thanks, but this function work if column type is number. I am working on string field.