Expand my Community achievements bar.

SOLVED

Display issue of data with a "double" type

Avatar

Level 1

Hello,

I'm working for a french retailer. We have an adobe console installed in french.

We've got some display issue with a "double" type.

 

Here's how it's declared in the schema : 

<attribute desc="Montant Agregé de la Cagnotte" label="Montant Agregé de la Cagnotte"
               name="MontantAggCagnotte" sqlname="montantAggCagnotte" type="double"/>

 When I look at the data inside Adobe Campaign, the separator is a comma (because the console is installed in french).

Schema_view_double.png

But when I send a email with that field as a personalisation, it's displayed with a point :

HTML_view_double.png

 

From what i've seen in the community, it appears that the data stored is the one from the server. Only the display of it is affected within Adobe Campaign. 

If an attribute Data type defined as ""double" in ... - Adobe Experience League Community - 160591

Résolu : Floating data type - Adobe Experience League Community - 328690

 

Our server is installed in english, that might explain the point, but we would like to display a comma within our HTML sent.

Is there a way to easily display a comma without using JS in the delivery ?

 

Thanks !

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hello @Arthur_LEBRIS ,

it could be also database settings. As what UI shows you can be saved differenlty in database.

 

 

function numberWithCommas(x) {
    return x.toString().replace(".", ",");
}

 

 

Or you can find any other locale function or library that is working with JS ES5

Marcel Szimonisz

View solution in original post

8 Replies

Avatar

Correct answer by
Community Advisor

Hello @Arthur_LEBRIS ,

it could be also database settings. As what UI shows you can be saved differenlty in database.

 

 

function numberWithCommas(x) {
    return x.toString().replace(".", ",");
}

 

 

Or you can find any other locale function or library that is working with JS ES5

Marcel Szimonisz

Avatar

Community Advisor

Hi @Arthur_LEBRIS 

 

First option and maybe easiest is to create a variable in your workflow converting MontantAggCagnotte to string (cons is you can have more than 2 digits after the ',' but you can truncate it)

 

Second option is more adcanced as you have to use a javascript library (ootb one dataTypes.js or custom one currency.js)

 

Thanks,

David



David Kangni

Avatar

Level 1

Hi @DavidKangni,

I've looked a little bit about your second option. It may be what we are looking for.

Do you have any documentation about it ?

Thanks,

Arthur

Avatar

Administrator

Hi @Arthur_LEBRIS,

Were you able to resolve this query with the help of the given solutions or do you still need more help here? Do let us know. In case the given solutions were helpful, then kindly choose the one that helped you the most as the 'Correct Reply'.

Thanks!



Sukrity Wadhwa

Avatar

Level 1

Hi @Sukrity_Wadhwa,

I'm trying to evaluate the given solutions but at first sight it doesn't seem to be what i need.

 

I'm discussing about the solution presented by @Marcel_Szimonisz with my data officer.

 

The solution presented (create a variable in your workflow) by @DavidKangni will work, but it will not be easy to industrialize it in many workflows. It needs a specific work for every data with a "double type", it would be easier if I just can use data from the schema without modifying it.

 

Arthur

Avatar

Administrator

Hi @Arthur_LEBRIS,

Sure! Thanks for sharing this update from your end. Let us know if @Marcel_Szimonisz's solution works for you. 

Regards,



Sukrity Wadhwa

Avatar

Administrator

Hi @Arthur_LEBRIS,

Did @Marcel_Szimonisz's solution worked for your use case? Please let us know.

Thanks!



Sukrity Wadhwa

Avatar

Level 1

Hello,

@Marcel_Szimonisz's solution was promissing but to advanced for us. It would have been a lot a development and tests for just a small inconvenience.

We used @DavidKangni's solution and made the enrichment in all the workflows.

 

Thank you all for your answers !

 

Arthur