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

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?

Perhaps the problem is that since the field didn’t have a value, it’s not being included in the model?

I would say that this is not expected behaviour. I would expect the save action to throw an error.

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

<field id="Preferred_Contact_Method__c" valuehalign="" type="" required="true" addnoneoption="true"/>

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

  • 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> <field id="Patient __r.Name"></field> <field id="Id"></field> <field id="Name"></field> <field id="Patient__ r.First_Name __c"></field> <field id="Education__ c"></field> <field id="In_School __c"></field> <field id="School_Name__ c"></field> <field id="Preferred_Contact_Method __c"></field> <field id="Permission_to_Call__ c"></field> <field id="Permission_to_Email __c"></field> <field id="Permission_to_Leave_Message__ c"></field> <field id="Permission_to_Send_Mail __c"></field> <field id="Permission_to_Text__ c"></field> <field id="Permission_to_say_CompassCare __c"></field> <field id="Registration_Complete__ c"></field> <field id="Case_Type __c"></field> <field id="LMP__ c"></field> <field id="Referral_Source __c"></field> <field id="Payment_Option__ c"></field> </fields> <conditions> <condition type="param" value="case" field="Id" operator="=" enclosevalueinquotes="true" novaluebehavior="noquery"></condition> </conditions> <actions></actions> </model>

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.

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

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

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

Yes i am also getting same issue in Wizard only.

Thanks,
Raj

Skuid, any update on this?

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

is it fixed?

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

I continue to experience this issue in multiple different SFDC orgs within wizard pages recently.

See screencast of one example here: http://recordit.co/Wl9ohGpbs5

This environment is Millau 11.2.6.

As a workaround, I often have to do strange things like set the value to blank through an event-triggered action sequence upon page load…but that can be problematic if the user is trying to load a previously filled out record…and suddenly they have to re-fill out that field.