Skip to main content
Nintex Community Menu Bar

How to restrict the number of digits after a decimal point in a currency field

  • August 6, 2019
  • 3 replies
  • 46 views

Forum|alt.badge.img+7

I have a currency field, in a purchase requistion form, being used in a repeating section.  I have restricted the field to only have 2 digits past the decimal in the SharePoint list, but that rule is not following through.  The field still allows a user to enter 3 digits past the decimal point, which in turn, is rounding up to the nearest dollar, which in turn, displays the incorrect total line cost.

 

How do I restrict the field, on the form, to only allow 2 digits past the decimal point?

 

3851iEAB71F8E9A2A06F7.png3852iA0B0C81AA7DF35DC.png

3 replies

MegaJerk
Forum|alt.badge.img+14
  • Scholar
  • August 13, 2019

Because the currency fields in Nintex Forms aren't particularly friendly, it's probably going to require a tiny custom solution. 

Questions

1. Are you using Classic or Responsive Forms

2. Do you have any preference as to how correcting user behavior should be handled. I personally just enjoy removing any unnecessary digits beyond a particular point automatically, as opposed to invalidating the input. But you may want to invalidate the control and force your users to manually correct the mistake. It just depends on how you'd like to control your environment. 

 

 

Can't promise I can get back to ya immediately, but when I have some free time, I should be able to cook something up once you answer those questions!



Forum|alt.badge.img+7
  • Author
  • September 12, 2019

Thank you. :-)

 

Answer to question 1 - classic

 

answer to question 2 - I would rather have the user make the correction.

 


Forum|alt.badge.img+12
  • Scholar
  • September 25, 2019

@DinaF ....Currency column in SP list becomes a SLT control on the form. You can use RegEx for vaidation.

  • Open the control settings of the control which you're using for currency
  • Expand Validation
  • Use "^d+(.d{1,2})?$" (don't use quotes) as expression
  •  Also put error message "Cannot add more than 2 decimals in currecy"