Solved

2 Decimal Places for NWC Workflow Variable?

  • 20 August 2020
  • 2 replies
  • 205 views

Userlevel 2
Badge +5

In NWC, if I have a decimal variable that I want to display two decimal places, I cannot. Am I missing something? 

 

Ex: if the value is 1.00 and I output that value, it comes out as 1.0 

 

Setting the "Default Value" setting to 0.00 reverts to 0.0 on save and there is no Currency type.

icon

Best answer by kdelcastillo 20 August 2020, 18:29

View original

2 replies

Userlevel 2
Badge +5

Well I am able to do a Format Number to String which allows me to format it as a currency but save it as a string (?!) and then strip out the $ that gets added automatically via regex. 


 


To have to do that for every decimal variable is a bit much when the SharePoint field is identified as 2 decimal places. 

Userlevel 5
Badge +19

@kdelcastillo are you trying to display the variable on a task form or in an email?


 


On the task form you should be able to use a Currency control which should retain your padding:



 


If you're trying to display in an email, then yes the Format Number to String action will be the best step directly before the email, and you should be able to select Currency as your format which will remove the need for the RegEx also:


Reply