No error on blank required field with 'Add None' option

  • 1
  • Problem
  • Updated 5 months ago
  • Acknowledged
  • (Edited)
I have a picklist field that I've marked required in the skuid builder (not SFDC), and I'm using the 'Add None' option.



When this field is left alone, skuid will process a save without throwing a warning or error that the field has no value.

Is that expected performance?

In general, I want to use 'add none' to force the user to pick an option, rather than just defaulting to the first item on the list. But I still want the field to be required.

Thoughts?
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb

Posted 2 years ago

  • 1
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb
Perhaps the problem is that since the field didn't have a value, it's not being included in the model?

Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
I would say that this is not expected behaviour. I would expect the save action to throw an error.
Photo of jorge cortes

jorge cortes

  • 160 Points 100 badge 2x thumb
Can you double check it is set to 'required="true" at the line level in the xml code? I have seen that sometimes there will be something here extra or missing and it will cause a different expected result
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb
<field id="Preferred_Contact_Method__c" valuehalign="" type="" required="true" addnoneoption="true"/>
Photo of Amy Dewaal

Amy Dewaal, Official Rep

  • 8,200 Points 5k badge 2x thumb
Matt,

Your expectations are correct, the picklist shouldn't save unless the user picks an option other than "None". I was able to see that functionality when I tried it out in Skuid 8.15.10.
  • What Skuid version are you on? 
  • Could you post some screenshots of your model setup? 
  • Is that picklist using a record type?

Thanks!
Amy
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb
  • 8.15.10
  • Screenshots below.
  • No record type.



Here's the xml for the model:
<model id="Registration_PatientCase" limit="1" query="true" createrowifnonefound="false" adapter="salesforce" type="" sobject="Patient_Case__c" doclone="">
            <fields>
                <field id="Patient__c"/>
                <field id="Patient__r.Name"/>
                <field id="Id"/>
                <field id="Name"/>
                <field id="Patient__r.First_Name__c"/>
                <field id="Education__c"/>
                <field id="In_School__c"/>
                <field id="School_Name__c"/>
                <field id="Preferred_Contact_Method__c"/>
                <field id="Permission_to_Call__c"/>
                <field id="Permission_to_Email__c"/>
                <field id="Permission_to_Leave_Message__c"/>
                <field id="Permission_to_Send_Mail__c"/>
                <field id="Permission_to_Text__c"/>
                <field id="Permission_to_say_CompassCare__c"/>
                <field id="Registration_Complete__c"/>
                <field id="Case_Type__c"/>
                <field id="LMP__c"/>
                <field id="Referral_Source__c"/>
                <field id="Payment_Option__c"/>
            </fields>
            <conditions>
                <condition type="param" value="case" field="Id" operator="=" enclosevalueinquotes="true" novaluebehavior="noquery"/>
            </conditions>
            <actions/>
        </model>
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb
If it's helpful, there's the action sequence in a wizard button where the save is failing to trigger the warning for the required field:




Not sure if this makes a difference, but it's not a new record. It's already stored in the database with no value, because it's not required in SFDC, only in the skuid ui.
Photo of Amy Dewaal

Amy Dewaal, Official Rep

  • 8,200 Points 5k badge 2x thumb
Matt,

Sadly, you've found a bug. The wizard specifically doesn't seem to respect the required property. We'll let you know when a fix is released for this issue.

Thanks!
Amy
Photo of Rajendra Rathore

Rajendra Rathore

  • 1,480 Points 1k badge 2x thumb
Hi Amy,

I am also getting same issue when i rendered a picklist field as radio button and marked that  field as required and when user click on next step button then it's not validate that required field.


Thanks,
Raj
Photo of Amy Dewaal

Amy Dewaal, Official Rep

  • 8,200 Points 5k badge 2x thumb
Raj,

Thanks for letting us know! Just to be clear, are you also in a wizard? If so then you're experiencing the same problem as Matt and we'll let you know when a fix is released
Photo of Rajendra Rathore

Rajendra Rathore

  • 1,480 Points 1k badge 2x thumb
Yes i am also getting same issue in Wizard only.

Thanks,
Raj
Photo of mark moser

mark moser

  • 80 Points 75 badge 2x thumb
is it fixed?
Photo of Josh Lewis

Josh Lewis

  • 1,218 Points 1k badge 2x thumb
Mark,

I just tested this in Skuid 11.2.2, and I don't see the same behavior in a simple test page I created. Do you have an example of this issue occurring in your Org?

Thanks,

Josh
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb
Skuid, any update on this?

Not being able to use required fields in a wizard is a serious problem for us and our customers.