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

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

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?

 

UnitPriceSPSetting.PNGUnit price setting in SharePoint list columnRepeatingSectionDisplay.PNGField on form

Labels: (1)
0 Kudos
Reply
3 Replies
Automation Master
Automation Master

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

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!


0 Kudos
Reply
Highlighted
dinafischer
Nintex Newbie

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

Thank you. :-)

 

Answer to question 1 - classic

 

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

 

0 Kudos
Reply
Automation Master
Automation Master

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

@dinafischer ....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"
0 Kudos
Reply