cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Workflow Hero

Show/Hide Rule from Multiple Columns

Jump to solution

Does anyone have any rules logic that for show/hiding a field based on two different columns?  The scenario I am trying to accomplish is in my form I have a field called Category.  If the user selects "Capital" from that dropdown it will display another field in the form called "Capital Type" using the rule Category !="Capital" which works.  

However, I also have a requirement that on another column named "SubCategory" that includes 3 choices and if one of those are selected then I'll need to display the "Capital Type" field as well. 

Does anyone have any suggestions for logic to have the "Capital Type" field displayed based on rules from two columns?  If I append my current formula rule to include checking against the second column the rule stops working. 

Does NOT work Category != "Capital" || SubCategory !="Capital IT Project" 

Labels: (2)
0 Kudos
Reply
10 Replies
Workflow Hero

Re: Show/Hide Rule from Multiple Columns

Jump to solution

rule action (hide) is taken when your formula evaluates to true.

if I understood your requirement correctly, you want to show capital type if category == 'Capital' OR SubCategory == 'Capital IT Project'

so to turn it to hide rule it should look like category != 'Capital' AND SubCategory != 'Capital IT Project', isn't it?

Reply
Workflow Hero

Re: Show/Hide Rule from Multiple Columns

Jump to solution

Hi Sherry,

Marian is right. If you switch your Formula to Category != "Capital" && SubCategory != "Capital IT Project" it will work.

In your formula the field will still be hidden even if SubCategory contains the value you need because Category is still not Capital and thus the first part of your Formula will hide the control.

Kind regards,

Enrico

Reply
Workflow Hero

Re: Show/Hide Rule from Multiple Columns

Jump to solution

 Hi Marian and Enrico,

 Thanks for responding to my post so quickly.  How do I get the field to show if Category is not capital, but the SubCategory choice is "Capital IT Project?" 

Thanks,
Sherry 

0 Kudos
Reply
Workflow Hero

Re: Show/Hide Rule from Multiple Columns

Jump to solution

not(Category != "Capital" && SubCategory == "Capital IT Project?")

Reply
Workflow Hero

Re: Show/Hide Rule from Multiple Columns

Jump to solution

Thank you Marian.  I used this without the not logic and it worked.  The only issue I am running into now, is when I add the SubCategory statement, it's not recognizing one of the choices in the category field.  

In the category field, I have the following choices: capital, commercial, IT, TT, and Site.  The rules are only to run if the user selects "Capital" or if they select "IT, TT or Site."  Selecting IT, TT or Site gives them the "SubCategory" field.

Selecting "Commercial" should not display any of the other fields, but when that choice is selected, the rules that I applied stop working.  Any ideas? 

0 Kudos
Reply
Workflow Hero

Re: Show/Hide Rule from Multiple Columns

Jump to solution

if it is not running just for one of the options I would double check you compare correct strings - maybe there is some extra space somewhere or a typo.

0 Kudos
Reply
Workflow Hero

Re: Show/Hide Rule from Multiple Columns

Jump to solution

Thanks, I'll check that out.

0 Kudos
Reply
Workflow Hero

Re: Show/Hide Rule from Multiple Columns

Jump to solution

Hi Marian,

Here is the working logic that I used and it works! 

Category!="Capital" &&PRFSubCategory!="Capital IT Project" &&PRFSubCategory!="Capital Tech Transfer Project" &&PRFSubCategory!="Capital Site Project"

Thanks for all your help.

Sherry 

Reply
Workflow Hero

Re: Show/Hide Rule from Multiple Columns

Jump to solution

glad you got it working.

however, keep in mind that with every new subcatagory or subcatagory name change your formula will stop working and needs to be updated.

0 Kudos
Reply