kindrex
Canvas Initiate

Hide control when it does not equal

Jump to solution

Hi all

 

I have a drop down that has multiple options on, however I want another control to unhide if the selection is anything except N/A, however when in preview it just doesn't work and appears as normal regardless.

 

not(equals(PolicyType, "N/A"))

 

Any ideas? Last hurdle to getting my form good to go after lots of research 🙂

0 Kudos
Reply
6 Replies
Tarf
Design Canvas Artiste

Re: Hide control when it does not equal

Jump to solution

Hi @kindrex 

 

wouldn´t you just hide the control if your multi-select contains "N/A"?

For this you can use the inArray Function

inArray(your_multi_select,"N/A")

 

0 Kudos
Reply
kindrex
Canvas Initiate

Re: Hide control when it does not equal

Jump to solution

Hi @Tarf 

 

Thanks for helping on this one too 

 

I don't think I've been clear in my description apologies.

 

The user can only make one one selection from the list which has loads of options, I.e.

N/A, End of Day, Clear Desk etc. 

 

If the user was to select any of the options I want the control to appear unless they select N/A then it should remain hidden.

 

I did try your solution to no avail sadly.

 

Thanks again for any help you can give 

0 Kudos
Reply
Tarf
Design Canvas Artiste

Re: Hide control when it does not equal

Jump to solution

Hi @kindrex,

 

depending on whether your control is a lookup or a choice field either

parseLookup(my-control) == "N/A"

or

my-control == "N/A"

should work as a hide rule.

0 Kudos
Reply
kindrex
Canvas Initiate

Re: Hide control when it does not equal

Jump to solution

Thanks again @Tarf , only issue i have is the control is still showing when no selections have been made. Its more that I want it to appear when everything but n/a is selected if possible? 

0 Kudos
Reply
Tarf
Design Canvas Artiste

Re: Hide control when it does not equal

Jump to solution

Hi @kindrex,

try combining the working rule with

isNullOrEmpty(my-control) || <rule_before>

 this then hides a control when the dropdown is either empty or "N/A"

View solution in original post

0 Kudos
Reply
kindrex
Canvas Initiate

Re: Hide control when it does not equal

Jump to solution
Epic thank you
0 Kudos
Reply