Expand my Community achievements bar.

Announcing the launch of new sub-community for Campaign Web UI to cater specifically to the needs of Campaign Web UI users!
SOLVED

Adobe Campaign Direct Mail content want to display pence, i.e. 1 as 1.00, 2 as 2.00 etc.

Avatar

Level 2

The input file has the field as a "0.00" (etc.) string but I need to check in a segmentation if the value is > 50. I cannot get the workflow to run without in the Load File activity, column definitions changing the field to as numeric. I use Float (double precision) to keep the decimals (i.e. the pence)
Later I need to output this field into the Direct Mailing and need it displayed as "0.00" (etc.) again. I can use the function ToString on the field but it still displays as 0.
So I was trying to use the Round (or Trunc) functions but these only mean the Direct mail Activity fails with this message in the DM log.
WKF-560015 'Round([targetData/CHEQUE_PAYMENT_SHARE_AM] , 2)' is not a valid alias (step 'Collects necessary data for message personalization'). A series of CASE WHEN statement might work but I was hoping somebody has come cross something similar before...

1 Accepted Solution

Avatar

Correct answer by
Level 6

Simple way is to keep your column as a string and then to use an enrichment activity right after in order to create a new column derivated from this one and apply the expression ToDouble(yourColumn).

- Even if the expression detail specifies "Convert an integer to a real number", it works on String - 

 

This way you manage your segmentation regarding the new field created in the enrichment.

View solution in original post

2 Replies

Avatar

Correct answer by
Level 6

Simple way is to keep your column as a string and then to use an enrichment activity right after in order to create a new column derivated from this one and apply the expression ToDouble(yourColumn).

- Even if the expression detail specifies "Convert an integer to a real number", it works on String - 

 

This way you manage your segmentation regarding the new field created in the enrichment.

Avatar

Level 2
Thanks LaurentLam. I was wondering if I would have to adopt such an approach. New double field created and used only for the segmentation. Old text field used in output. It works well.