Remove commas in numbers for JSON output

Is there a way to format a number without commas in the template used for JSON output? I don’t want to lose the commas in the app, just in the JSON file output.

SUBSTITUTE( [number] , “,” , “” ) might work.



Thanks, all.

CONCATENATE() worked great. Didn’t try the other.

A couple points for everyone’s better understanding (my own included):

So I’m assuming there is not a comma in the actual data value number, so my substitute() suggestion actually wouldn’t work (unless it was a text value). The comma is just a formatting thing, from the ‘show thousands seperator’ toggle in the column definition being turned on.

Concatenate works because it converts the actual value (comma-less, before formatting) into a text value, thereby removing/ignoring the comma formatting. Correct?

Another point is that apparently the comma seperator formatting not only shows in the app, but also gets passed on to the JSON webhook. I would think that only the raw value would get passed on in such a case, is there some rationale why the comma remains?

Actually, you shouldn’t be needing to do this because the number formatting is not carried to a JSON parameter’s value. The number is always a number and when you apply the CONCATENATE expression, than the numerical figure will be converted to text. Provided you are making some calculations with that value at the endpoint, that it will result with an error.

@Phil may I request your advise here?

Correct, in that there is no comma in the original value for SUBSTITUTE() to remove. But, in passing through SUBSTITUTE(), the original value is converted to Text (without formatting and thus without commas). So, in this case, your SUBSTITUTE() is effectively equivalent to @LeventK’s CONCATENATE().


1 Like