cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Nintex Newbie

How to email currency with thousand separator but not decimals

Jump to solution

SharePoint List items

Field type: currency, no decimals.  Output ex.: $1,500

 

Requirement:

Email HTML table (daily cost report) with desirable output $1,550. This is because the numbers reported are in millions.

 

Issue:

Inline function currency() displays cents/decimals. Output $1,550.00. 

Storing field as number type variable, output is missing the thousand separator (ex.: 1500).

Wasn't able to format the variables (number, text or currency types) to the desired format.

I tried using inline function with text variable (remove() and round()), but I must be doing something wrong,  it’s parsing the literal text.  I thought this would be something simple but I'm stuck.  Any help is much appreciated.  Thanks!
 
 
 
 
 
 
 
 
 
 




Labels: (1)
0 Kudos
Reply
5 Replies
Highlighted
Nintex Newbie

Re: How to email currency with thousand separator but not decimals

Jump to solution

Hi Monica,

I'm not sure if I am missing anything, but when I run a test with a SharePoint List column defined as currency and no decimals it appears to go through to the email without issue - see below:

Here I have simply put the value, as is, in the first line of the email and then again within the HTML table.

Are you only pulling this value in from the list without doing anything extra to it?

Cheers,

Mark

0 Kudos
Reply
Highlighted
Nintex Newbie

Re: How to email currency with thousand separator but not decimals

Jump to solution

Replace decimals with empty string using regular expression:

fn-Replace(fn-Currency(yournumber), "\.*$", "")

View solution in original post

Reply
Highlighted
Nintex Newbie

Re: How to email currency with thousand separator but not decimals

Jump to solution

Hi Manfred, thanks for your reply.  I used a modified version of your answer, only because I didn't know how to enter the pattern you provided in the Regular Expression form.  Here is what I used and it worked. Thank you!

regularExpression.png

Mark, In my scenario I'm retrieving rows of information from a collection variable.

0 Kudos
Reply
Highlighted
Nintex Newbie

Re: How to email currency with thousand separator but not decimals

Jump to solution

Hallo Monica

be carefull. Your regular expression pattern will not work als you expected. The dot in regex is a meta character. It will match any character. To realy match a dot you have to escape it with a back slash as in my regex pattern. The $ there matches end of string.

Kind regards

Manfred

0 Kudos
Reply
Highlighted
Nintex Newbie

Re: How to email currency with thousand separator but not decimals

Jump to solution

I'm trying to set a textbox value using a formula in a calculated value via JavaScript but can't get it remove the decimals.

 

Anyone?

 

setTextBoxSubmissionEstimatedMarketValue(fn-Replace(currency(SubmissionEstimatedMarketValue), "\.*$", ""))



0 Kudos
Reply