Skip to main content
Nintex Community Menu Bar
Question

Numeric value validation on save

  • July 9, 2024
  • 9 replies
  • 21 views

Forum|alt.badge.img+3

I have a page with 5 models. One of the models has a numeric value (double). When I enter an invalid value (string), I don’t get any error message. The model saves successfully and just blanks out the number value.

I tried to “Add on-error action” to the button without any luck.
I want to avoid writing the whole save in Javascript.

This topic has been closed for replies.

9 replies

Forum|alt.badge.img+20

Well. I think I get what you’re asking. You’ve got a snippet that does attempts to update field values. Then an action to save is set. If you know which field is supposed to be a numeric value, why not just make sure it’s a number before finishing the snippet.


Forum|alt.badge.img+11

Can you reproduce this outside of your page i.e. in another page?  If so, post sample XML here.


Forum|alt.badge.img+17
  • Nintex Employee
  • July 9, 2024

Amr,  why are you not using normal Salesforce Validation here?  Skuid will post any validation error message on your page. No coding needed. 


Forum|alt.badge.img+11

If you make it a required field, you will get field validation.  Otherwise, either add server side validation per Rob, or implement a custom field renderer (Rob would this work too?).

0f5ba194780bf874e72aeeef20f28d98c0f30a02.png




Forum|alt.badge.img+20

And there it is. The “Nuts” as they’d say in poker.


Forum|alt.badge.img+17
  • Nintex Employee
  • July 9, 2024

You could do validation in a custom field renderer - to achieve a client side behavior - but the server side solution is so much easier… ie no code. 


Forum|alt.badge.img+3

Thanks all for your replies. Sorry for being away for time difference (I am in Australia).
I replicated the same in a simple page with one model. Kindly note here there is no coding involved. Only out of the box save.

4c7bcce9cf77d75dfe7e552f56a5cc0a0f497fdc.png



Forum|alt.badge.img+3

I found a workaround by adding validation rule on Salesforce side.

NOT( ISNUMBER(Text(ts2__Years_of_Experience__c )))

I hope there is a better solution.


Forum|alt.badge.img+17
  • Nintex Employee
  • July 9, 2024

Glad you were able to get this working.  Enjoy your Austrailan summer.