How to render the fields based on custom picklist values?

  • 1
  • Question
  • Updated 3 years ago
I Have to render couple of fields depending upon the custom picklist value selection.

Example: For custom picklist value: "Test" want to render fields 'a', 'b', 'c'.
                                                         "Skuid" want to render fields 'a','b', 'd', 'e'.
Where a,b,c,d,e are the custom fields.
Photo of Goutham J

Goutham J

  • 568 Points 500 badge 2x thumb

Posted 4 years ago

  • 1
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
You can use our conditional rendering feature on the custom fields,  or the field editor section where they are contained. 

Read this tutorial:  http://help.skuidify.com/m/supercharge-your-ui/l/173514-conditional-rendering-display-of-page-compon...
Photo of Goutham J

Goutham J

  • 568 Points 500 badge 2x thumb
Thanks for the reply, basically we are preparing the dynamic pick-list where pick-list label is the object name and value will be object 'id'. So, in this case how can I compare with the object 'id'.
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
I think you are going to need to go with a custom solution here. 

Create two models,  one that retrieves object ID's that match the "test" scenario.   Another that retrieves object ID's that match the "Skuid" scenario. 

Then your javascript will look at the field that looks up to the object.  If that ID is found in the rows of model 1, it should show the fields in the "test" scenario.  If that ID is found in the rows of model 2, it should show the fields in "Skuid" scenario.  You can call conditional rendering from javascript.