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

Conditional rules for hiding items on forms

Jump to solution

Hi All,

I am having trouble coming up with the correct formula for hiding a prompting label on my form. Please help!

It depends on the input of two choice questions

I want the label to be hidden, UNLESS the answers to the questions are both NO.

I have tried numerous rule combinations, but can't make it look at the result of both questions as a whole. Maybe I have the syntax wrong.

The last option I tried was

and(keystakeholder_CHC!="No", priorityportfolio_CHC!="No").

It was reading KeyStakeholder in isolation, and as soon as that NO was selected there, it would show the decline label.

I have further scenarios that will use a similar logic in the form so if I could just get it right for one, then I would be able to complete the rest.

Any ideas?

Thank you!

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

Re: Conditional rules for hiding items on forms

Jump to solution

can you try the functions for "not" and "equals"

i.e.

and(not(equals(keystakeholder_CHC,"No")), not(equals(priorityportfolio_CHC,"No")))

0 Kudos
Reply
Workflow Hero

Re: Conditional rules for hiding items on forms

Jump to solution

Thanks for the suggestion Cassy - unfortunately the result is the same.

0 Kudos
Reply
Workflow Hero

Re: Conditional rules for hiding items on forms

Jump to solution

I want the label to be hidden, UNLESS the answers to the questions are both NO.

so you want to hide label if at least one of controls is different from 'No'.

ie. one OR the other OR both are different from 'No'.

so you should have used or() condition instead of and()

or(keystakeholder_CHC!="No", priorityportfolio_CHC!="No")
Reply
Workflow Hero

Re: Conditional rules for hiding items on forms

Jump to solution

Hi Marian - thanks for your response, but no. The condition is true only if the answers to BOTH questions is no.

0 Kudos
Reply
Workflow Hero

Re: Conditional rules for hiding items on forms

Jump to solution

Oops - sorry Marian - have re-read your comment and yes, that makes sense. I will try this now

0 Kudos
Reply
Workflow Hero

Re: Conditional rules for hiding items on forms

Jump to solution

Absolutely fantastic - thank you Marian - that has worked like a charm!

Reply
Workflow Hero

Re: Conditional rules for hiding items on forms

Jump to solution

Hi Marian, I wonder if you would have time to help me again. I have hit another brick wall - I didn't put the full details in my earlier question as I thought I would be able to work it out for myself. I have been able to for the instances where KeyStakeholder is anything but NO (Yes or Blank), but I am not sure how to translate this over for when the condition needs to include the instances where KeyStakeholder is "No"....

Essentially, the label should be hidden regardless of what is selected in the Keystakeholder choice (Blank, yes, no) - it is the answers to the other Yes/No questions that should make the statement visible or not.

I want the prompt label to be HIDDEN in the following instances (where both are true):

When KS != No && Right Region != No

ALSO

When KS != Yes &&  PriorityPortfolio != No

OR

When KS != Yes && Right Region != No

OR

When KS != Yes && Budget != No

Appreciate any assistance you can give me

Thank you

Jacquie

0 Kudos
Reply
Workflow Hero

Re: Conditional rules for hiding items on forms

Jump to solution

so if I understand your requirement correctly, your conditions could be simplified like

- if  'Right Region' != No (regardless of value of KS)

- AND (ALSO):  KS != Yes AND ( PriorityPortfolio != No OR Budget != No)

so rule's formula might look like

RightRegion != 'No' && KS != 'Yes' &&  (PriorityPortfolio != 'No' || Budget != 'No')‍‍

if you used Yes/No checkboxes for all that options it might be eve simpler

RightRegion && not(KS) && (PriorityPortfolio || Budget)‍‍‍
0 Kudos
Reply
Workflow Hero

Re: Conditional rules for hiding items on forms

Jump to solution

Hi Marian, thank you for this. I tried this but unfortunately it is showing the statement when YES is selected for the KeyStakeholder condition. However, you highlighted for me that if the result of KS doesn't matter for Right Region, then I don't need to define anything for KS, so this is what is working now:

or(keystakeholder_CHC!="No", priorityportfolio_CHC!="No")&&or(keystakeholder_CHC!="No", Budget_CHC!="No")&&or(rightregion_CHC!="No")

Thank you so much for your help!

Reply