Numeric value validation on save

edited June 25, 2020 in Questions
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.


  • Pat VachonPat Vachon 💎💎💎
    edited June 25, 2020
    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.
  • edited May 8, 2019
    Can you reproduce this outside of your page i.e. in another page?  If so, post sample XML here.
  • Rob HatchRob Hatch 🛠️ 
    edited September 1, 2016
    Amr,  why are you not using normal Salesforce Validation here?  Skuid will post any validation error message on your page. No coding needed. 

  • edited June 25, 2020
    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?).


  • Pat VachonPat Vachon 💎💎💎
    edited January 5, 2016
    And there it is. The "Nuts" as they'd say in poker.
  • Rob HatchRob Hatch 🛠️ 
    edited September 1, 2016
    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. 
  • AmrAmr
    edited January 6, 2015
    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.


  • AmrAmr
    edited January 7, 2015
    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.
  • Rob HatchRob Hatch 🛠️ 
    edited September 1, 2016
    Glad you were able to get this working.  Enjoy your Austrailan summer. 
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!