Skip to main content
Nintex Community Menu Bar

Show/Hide Rule from Multiple Columns

  • Feb 7, 2017 7:50 PM UTC
  • 10 replies
  • 53 views
  • Translate All

Forum|alt.badge.img+2

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" 

10 replies

Forum|alt.badge.img+14
  • Scholar
  • Feb 8, 2017 12:19 AM UTC

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?

Translate

Forum|alt.badge.img+12
  • Nintex Partner
  • Feb 8, 2017 6:59 AM UTC

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

Translate

Forum|alt.badge.img+2
  • Author
  • Nintex Partner
  • Feb 8, 2017 1:37 PM UTC

 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 

Translate

Forum|alt.badge.img+14
  • Scholar
  • Feb 8, 2017 1:56 PM UTC

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

Translate

Forum|alt.badge.img+2
  • Author
  • Nintex Partner
  • Feb 9, 2017 12:54 PM UTC

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? 

Translate

Forum|alt.badge.img+14
  • Scholar
  • Feb 9, 2017 1:41 PM UTC

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.

Translate

Forum|alt.badge.img+2
  • Author
  • Nintex Partner
  • Feb 9, 2017 1:43 PM UTC

Thanks, I'll check that out.

Translate

Forum|alt.badge.img+2
  • Author
  • Nintex Partner
  • Feb 17, 2017 3:13 PM UTC

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 

Translate

Forum|alt.badge.img+14
  • Scholar
  • Feb 17, 2017 3:29 PM UTC

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.

Translate

Forum|alt.badge.img+2
  • Author
  • Nintex Partner
  • Feb 17, 2017 3:32 PM UTC

Thanks for the heads up.  I hope that the stakeholder will not have any more changes, but I plan to document this before turning it over.

Translate