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.
Solved! Go to Solution.
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.
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!
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-
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 ?
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 ?
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?
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.