RWillYum
Canvas Initiate

Disable Fields When Panel Unhidden

Jump to solution

Hello Everyone,

 

I have a form where the user may need to add additional lines. The desired function is similar to the repeating section control. However, I use multiple controls hidden within panels rather than one repeating section so that I can more easily access the list data. There are a number of controls contained within each panel, and some of these controls need to be disabled based on other values within the form. My formatting rules work correctly for the first line of controls (that one is not hidden), but the rules do not seem to trigger on any of the controls within the hidden panels. If I unhide the panel, I must then change the values in the associated controls twice in order to trigger my disable rules.

For example, I have a hidden date control (Control A) that is unhidden based on a selection in the above row. This field should also be disabled if a specific choice control (Control B) equals "Reversal". This functions on my first row, but it does not work on Control A unless I unhide it and change the value of Control B again to trigger the rule.

I have tried to trigger the rule using javascript, but I have been unsuccessful. I have also attempted to change the order of my rules, but I still get the same result. Would anyone be able to assist?

 

Thanks,

 

RW

0 Kudos
Reply
4 Replies
kunalpatel
Automation Master
Automation Master

Re: Disable Fields When Panel Unhidden

Jump to solution

@RWillYum .....Did you try connecting your repeating section to a MLT list column (plain text) and use query xml, MLT column as source in workflow to manipulate the data?

0 Kudos
Reply
RWillYum
Canvas Initiate

Re: Disable Fields When Panel Unhidden

Jump to solution

@kunalpatel ...No, I plan on continuing to use separate fields so that I can run the enable/disable rules on each line item rather than every iteration of the control within my repeating sections. My issue is that I cannot trigger a disable rule on any control that was previously hidden. It seems that the rule does not evaluate until 2 conditions are met: 1 - the controlmust first become unhidden 2 -  the value of the associated control driving the rule is changed.

0 Kudos
Reply
kunalpatel
Automation Master
Automation Master

Re: Disable Fields When Panel Unhidden

Jump to solution

@RWillYum .....Did you try using the default value of the control in your rule when the panel is hidden?

 

For e.g.

 

  • I've P1, P2, P3 panel
  • P1 has SLT1, P2 has SLT2 and P3 has Cho1(DD) controls
  • SLT1, SLT2 is blank by default and no choice is selected in Cho1 by default
  • Cho1 is hidden if SLT1 is null or empty 
  • SLT2 is disable if Cho1 is null or empty
  • Now assume in your case if default Cho1 value is Option1 then change the rule for SLT2  to "Cho1=="Option1""

 

In short if the panel is hidden then no one can change the default values of the controls within that panel and hence you'll have to use that as your conditions in your rule.

 

View solution in original post

0 Kudos
Reply
RWillYum
Canvas Initiate

Re: Disable Fields When Panel Unhidden

Jump to solution

@kunalpatel ...

Thanks, I realized I had selected both Hide and Disable. Removing the disable option fixed my issue. I appreciate the help!

0 Kudos
Reply