How many level of Expression for ?

  • 30 March 2017
  • 5 replies
  • 0 views

Badge +3

Hi,

I have the following expression set to the panel control.

fn-And(fn-Not(fn-Equals(Status,"0")), fn-Not(fn-IsNullOrEmpty(Assignee)))

201318_pastedImage_1.png

It is working when I set either (fn-Not(fn-Equals(Status,"0")) or fn-Not(fn-IsNullOrEmpty(Assignee)) in the control. But not working with fn-And(fn-Not(fn-Equals(Status,"0")), fn-Not(fn-IsNullOrEmpty(Assignee))).

I would like to know is there any problem with the expression? or is there any limitation of preparing the expression?


5 replies

Badge +7

Hi Dorothy,

I just tested this rule and it seems to work.

Could it be a problem with the meaning of the rule?

Literrally, you try to make a control visible when Status is different to "0" AND "Assignee" is filled. Both conditions are required. And it applies only on saved properties of the item. If you change values of "Status" and "Assignee" controls at runtime, nothing will change. So it only worths on loading of an EditForm or a DispForm.

Does it correspond to your need ?

Regards,

Badge +9

is right. In addition if there is requirement to change visibility of controls during runtime then formatting rules should be used to disable/hide controls.

Badge +3

Hi Pierre & Manfred,

After some testing, I found the control calculated value cannot work with the above expression. It is working on single line of text. I would like to know is there any work around for this? Thanks!

Badge +3

Sorry Pierre & Manfred,

Finally, I find the problem. It is expression issue (fn-Not(fn-Equals(Status,"0")) or fn-Not(fn-IsNullOrEmpty(Assignee)) should be (fn-Not(fn-Contains(Status,"0")) or fn-Not(fn-IsNullOrEmpty(Assignee)).

Badge +7

Glad to see that you've finally found a solution.

Could you please mark your answer as correct ? happy.png

Regards

Reply