Adobe Campaign Direct Mail content want to display pence, i.e. 1 as 1.00, 2 as 2.00 etc. | Adobe Higher Education
Skip to main content
Level 2
June 18, 2021
Resuelto

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

  • June 18, 2021
  • 1 respuesta
  • 1239 visualizaciones

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...

Este tema ha sido cerrado para respuestas.
Mejor respuesta de LaurentLam

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.

1 respuesta

LaurentLam
LaurentLamRespuesta
Level 5
June 20, 2021

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.

CogsAutor
Level 2
June 21, 2021
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.