AnsweredAssumed Answered

How to set dependency rules for multi select field or hide a tab and make required fields not required within the hidden tab?

Question asked by Katie DelValle on Nov 27, 2019
Latest reply on Dec 1, 2019 by Maryam Aslam

I have a case where I'm using javascript to determine if a panel or tab is visible or hidden. I have this successfully implemented but I have many required fields within each hidden tab that still pop up when I try to save the record. The main reason I'm looking for a coding solution is because the Studio dependency formula doesn't work with a multiselect field. My multiselect field is a field where the user selects the product they are wanting. They could have many products so we have to use a multiselct field.


So, my question is how do I hide a tab or panel AND make the required fields within not required to save the record? I have the tabs hidden, but the fields still pop up. I have used the studio sugar logic to make these required fields dependent on the multiselect field -- BUT what I've found is that the dependency works great unless I have more than one product added to the multiselect field. I can't rely on the required fields only popping up when only 1 service is selected. 


What is the best way to accomplish this goal? Thanks for all the insight! I appreciate all the help!