Skip to main content

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!
 
 
 
 
 
 
 
 
 
 




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


Replace decimals with empty string using regular expression:

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


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.


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


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), ".*$", ""))




Reply