Conditional Error on Form

  • 27 January 2016
  • 6 replies
  • 1 view

Badge +5

I'm playing with hiding controls in the Form and keep getting an error when trying to preview the form. I have a "choice" column that is a dropdown for different facilities, called "facilities." In the form are several sections, say Traffic, Inventory, Engineering, etc. Some facilities do not have Engineering, so when they choose that facility in the dropdown, I want that part of the form to hide. I'm trying this piece of code: {ItemProperty:Facility}="PE" then choose the hide checkbox at the bottom.

The error I'm getting states "Cannot assign to a function result." Obviously if I remove the code then the form loads fine. Just not sure how to word the syntax correctly to get it to hide.

I noticed if I change it to !="PE" and instead of hide, choose Disable, it works. I would just rather hide it though.


6 replies

Badge +6

Hi Michael,

I believe the correct syntax for the equals is "==", just as the syntax for "not" is "!=" as you found out.

Cheers,

Mark

Badge +7

Hi Michael,

In addition to what Mark Peacock, you could also use the inline function equals(Facility,"PE").

I would also point that you used the {ItemProperty:Facility}.

ItemProperty is different from the "Named Control" used in the form.

170763_pastedImage_2.png

They are connected but if you want that the user selection renews the check of the rule, you must use the named control.

Badge +5

Will do, apologies for not testing this sooner. SP/Nintex is my side job, help desk is busy so it will still be another day or so before I can return to this and test. Will update if that fixed it or not.

Badge +5

THIS WORKED!

But have one issue, say I select PE (which will hide the associated controls) then, whoops, I work in NA. I choose NA and it puts everything back, but it overlaps eachother.

error.PNG

Here is the form in edit mode, spacing is off only because I was testing if that was the issue:

error2.PNG

Badge +7

Hi Michael,

Try to wrap all the "Plating" content in a specific panel, and all the "Stamping" content in another one.

Then apply to rule only on the second (not on its content directly).

Badge +5

Thank you, that helped a lot.

Reply