No Error for Required Field

  • 1
  • Question
  • Updated 3 years ago
  • Answered
  • (Edited)
I have a two object where the child record is created whenever parent Status to changes to certain value. User gets a email to click on this link and which will be redirected user to Child Record Skuid page. In this page we have some field which we have marked as Required(on SKuid page, not from backend). But when we submit this record, Skuid required error is not working even though value on the Fields are blank. Is there a specific condition I am missing?

Kindly suggest.
Photo of Rahul

Rahul

  • 542 Points 500 badge 2x thumb

Posted 3 years ago

  • 1
Photo of David Giger

David Giger

  • 1,758 Points 1k badge 2x thumb
Hi Rahul

Did you activate the required option on the table or using "override field metadata" on the model?
How does the page behave if you set it to required in the back-end? Or is that not an option for you?
I can't reproduce your error though, both options work as expected.

Cheers
Photo of David Giger

David Giger

  • 1,758 Points 1k badge 2x thumb
Hi Rahul

Did you activate the required option on the table or using "override field metadata" on the model?
How does the page behave if you set it to required in the back-end? Or is that not an option for you?
I can't reproduce your error though, both options work as expected.

EDIT: in this thread the same issue is discussed, but no solution found so far :(

Cheers
Photo of Rahul

Rahul

  • 542 Points 500 badge 2x thumb
I made the check box required as checked. Can't use the salesforce standard require option or can't set a validation, as on insert of child record it will throw error. When I click on Submit button, field is required but still it is allowing me to update the record. But if I open the detail page(another skuid page to show the details of the record) and then edit and try to save the record, this time it is throwing the error. I am not sure what exactly is happening ...
Photo of Rahul

Rahul

  • 542 Points 500 badge 2x thumb
Anyone can check on this issue ?
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
Look in your model data and make sure the field is truly empty and not prepopulated with a space  (" ").   The latter will look like a value to both skuid and salesforce.

To look in your model data open the browser developer tools.  Go to the console and type this.

skuid.$M('YourModelName').data

That will show you the data in the model.

 
Photo of Rahul

Rahul

  • 542 Points 500 badge 2x thumb
Thanks Rob for your input, As suggested by you, I checked in the console log, but I am unable to see those field itself in the colsole after putting the skuid.$M('YourModelName').data.
Is there something I am missing ??
Photo of Rahul

Rahul

  • 542 Points 500 badge 2x thumb
I believe those fields are empty and that is the reason, its not displayed in the console... Any input from your end?
Photo of Rahul

Rahul

  • 542 Points 500 badge 2x thumb
Hi Rob,

Let me clear the situation i tried today :-
1) there are 3 required fields, out of which one is prepoulated in the form.
2) two other fields are empty and does not have value. 
3) If I tries to submit the form without giving any input in these two fields, Skuid Required is not working and it is allowing me to save the record, which shouldn't happen.
4) If I input a value in one of these 2 fields and tries to save the record, Skuid Required is working but now required error is thrown for both the field even though there is some value in the one field

Let me know if this  explanation work and if you can provide input.
(Edited)
Photo of Rahul

Rahul

  • 542 Points 500 badge 2x thumb
Please see the screenshot..

Photo of Rahul

Rahul

  • 542 Points 500 badge 2x thumb
Hi Rob, Could you please help out to resolve this issue ?
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
Rahul.  This is indeed very strange. I cannot reproduce the error in the version of skuid that I am using.  What version are you using? 
Photo of Rahul

Rahul

  • 542 Points 500 badge 2x thumb
Hi Rob,

Thanks for the resposne. We are using version : - 7.24 
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
Would you be willing to upgrade to our latest release (on skuid.com/skuidreleases) 

Maybe do it in a sandbox or dev org and see if you can replicate the scenario.