Skip to main content
Nintex Community Menu Bar
Solved

Not adding the commas to the numbers when generating a document

  • May 5, 2025 2:14 PM UTC
  • 8 replies
  • 197 views
  • Translate All

Forum|alt.badge.img+3

I have a simple document generating workflow that is pulling from a SharePoint list which contains numbers with commas.  When i generate the document, these numbers are not including the commas in the numbers.  For example:

$30,000 (How it looks in SharePoint)
$30000 (How it looks when generating the document using the variables)  

 

Anyone know how I can include the commas exactly how it shows in SharePoint?  Hopefully I am making sense.  

 

Thank you!

Best answer by tonyrgreco

I GOT IT!!!! I used the following:

 

 

View original

8 replies

Simon Muntz
Nintex Partner
Forum|alt.badge.img+23
  • Nintex Partner
  • May 6, 2025 12:06 AM UTC

Hi ​@tonyrgreco 


Welcome to the community.
If you use a Format Number to string action to format the currency before adding it to the document, does that help?
https://help.nintex.com/en-US/nwc/Content/Designer/Actions/FormatNumbertoString.htm

Translate

Forum|alt.badge.img+3
  • Author
  • Rookie
  • May 6, 2025 12:16 AM UTC

​@SimonMuntz Thank you bud.  I am going to try this tomorrow.  I will post my findings.  Appreciate the help!  

Translate

Forum|alt.badge.img+3
  • Author
  • Rookie
  • May 7, 2025 2:18 PM UTC

​@SimonMuntz That worked.  Thank you sir.

Translate

Forum|alt.badge.img+3
  • Author
  • Rookie
  • May 8, 2025 6:42 PM UTC

​@SimonMuntz I do have another question.  Is there a way to remove the decimals after the number?  

I am getting:

$30,000.00
and  I would like it to read:

$30,000
 

Thank you

Translate

Simon Muntz
Nintex Partner
Forum|alt.badge.img+23
  • Nintex Partner
  • May 8, 2025 11:09 PM UTC

Hi ​@tonyrgreco,

After you have converted the value, use a regular expression action to EXTRACT the whole number.
The pattern to use is ^[\d,]*

 

 

Translate

Forum|alt.badge.img+3
  • Author
  • Rookie
  • May 9, 2025 1:16 PM UTC

​@SimonMuntz 

Thank you.  I have tried this but now its giving me blanks.  I have some questions:

 

  1. Do I store the new result as a new variable?  I tried both.  Same results.  All I get is blanks on the document generation.  
  2. I placed the apply the expression step after each variable to remove the decimals.  Is this correct? 

     

     

Translate

Forum|alt.badge.img+3
  • Author
  • Rookie
  • May 9, 2025 1:44 PM UTC

​@SimonMuntz I even tried to do a replace in the expression with the following:

 

 

This gave me the number on the doc gen, however it now has the “” contained in the number.  


 

Any ideas?  :)

Translate

Forum|alt.badge.img+3
  • Author
  • Rookie
  • Answer
  • May 9, 2025 2:08 PM UTC

I GOT IT!!!! I used the following:

 

 

Translate