Not applicable

How do you hide a form control based on two different conditions?

Jump to solution

I have some controls that I would like to hide if they're either blank (empty) or contain a number stored as a string. I've tried just about everything I can think of, and so far, nothing has worked. I can hide them if they're blank, no problem. But, as soon as I attempt to put another rule, or try to make a composite one with something like the "or" runtime function, it doesn't work.

Tags (1)
0 Kudos
Reply
22 Replies
eharris04
Nintex Newbie

Re: How do you hide a form control based on two different conditions?

Jump to solution

Calvin,

Not sure what your expressions look like but the values have to equal true for it to work.

Check out this document and view the section on hiding a section.  I think this shows you what your expression needs to be formatted as to achieve two different condition comparisons.

How to design a Multi-Step form with Nintex Forms for Office 365

Reply
Not applicable

Re: How do you hide a form control based on two different conditions?

Jump to solution

Eric,

Here is one of my actual formulas:

or(isNullOrEmpty(MyFormSteward), 'Not Needed')

Which I would think should work based on the function description, "Returns TRUE where either logical arguments are true. Returns FALSE when both values are False. or(boolean1, boolean2)".

As I'm using List Lookup Controls, I believe that the rules are executing before any values are selected. Is there someway that I can use the filtered value (I'm using cascading filtering) to just populate plain text boxes and then execute the rules against them?

I will review the document in the link you provided.

Thanks for your help... it is appreciated!

Reply
cju
Automation Master
Automation Master

Re: How do you hide a form control based on two different conditions?

Jump to solution

In your formula, 'Not Needed' is not a boolean.

What do you want to test exactly ?

View solution in original post

Reply
Not applicable

Re: How do you hide a form control based on two different conditions?

Jump to solution

I've had a bug open (via our ICT department) for almost exactly a year on essentially the same problem. I have also asked the question on the forums more than once but nobody seems to have a solution.

I was using the expression-

fn-And(fn-IsMemberOfGroup(<groupname>),fn-Not(fn-Equals(Item Status,"Pending")))

I have tried every variant I can think of of this "functional" version and versions closer to Javascript expression syntax (e.g. using "!" and "&&" for NOT and AND) but none of them work. The number of bugs and hopeless documentation for the Forms product mean users are entirely dependent on product support, and i'm sorry to say Nintex are not adequately responsive.

0 Kudos
Reply
cju
Automation Master
Automation Master

Re: How do you hide a form control based on two different conditions?

Jump to solution

I've already built rules which formula had more than one condition and it worked.

Can you share the formula of the formatting rule that didn't work ?

Reply
Not applicable

Re: How do you hide a form control based on two different conditions?

Jump to solution

Caroline, see my posting above. The same issue was raised on the forums here and here.

Reply
cju
Automation Master
Automation Master

Re: How do you hide a form control based on two different conditions?

Jump to solution

It seems that you used an expression in the Enabled field in the settings of the control.

Have you tried to use a formatting rule instead ?

0 Kudos
Reply
Not applicable

Re: How do you hide a form control based on two different conditions?

Jump to solution

I am using expressions in the Enabled and Visible fields. Those are the options that are immediately offered by the forms designer, so they look like a reasonable approach to take and they work- right up to the point where you try to use a compound (multi-variable) expression.

The Formatting Rules function seems to be redundant with these options (if you ignore the aditional formatting capabilities like fonts and colours), what is the advantage / disadvantage of one vs. the other?

0 Kudos
Reply
cju
Automation Master
Automation Master

Re: How do you hide a form control based on two different conditions?

Jump to solution

The inline functions that you can use are not exactly the same.

I prefer using the rules because you can display all the rules that you have in one form. You don't have to open every controls to see if there are conditions defined in the Enabled or Visible fields. What's more, if you want to apply the same rule to multiple controls (you can use "Self" in the formula to get the value of the current control), you only need to define the rule one time and the apply it to all the controls. Then the maintenance of your form is really easier.

Reply