picklist none to n/a

  • 1
  • Problem
  • Updated 3 years ago
  • In Progress
I've setup a controlling field in which one of the controlling field values has no values included in the dependent list. Then setting the dependent picklist as required causes an error as there aren't any values available to choose from.



This required field should be conditional in this scenario.

Can anyone suggest another approach to make this field required only values are available?

I've currently set up a Validation Rule to essentially make the field required, but this isn't ideal when dealing with table component.
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb

Posted 3 years ago

  • 1
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb
I think you could do this with a custom field renderer.

You can access the picklistEntries via the field metadata, right? I'm not sure if it will be easy to figure out if there are available values or not.

You can confidentially set the field to be required through the metadata as well, correct?
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb
Hmm, perhaps not. I don't see anything in the metadata about "required"

"required" is a css class that you could to manipulate with jQuery, but I don't know that it would have any impact on how Skuid processes the field.
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
There is a property called required in the field but it does nothing. I can set it but nothing happens as I don't think it does anything to the model or row to manage this required field.

What I need is an api function to make it required.
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
This must be possible with the API as this is how Conditionally rendered required fields work.
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
Strange. I changed the title  to this before posting.

Anyways. There doesn't seem to be a way to set a field to be required on just the one row vs all rows. Looked for the function, but no dice.