I'm creating a form with a panel which I want to be hidden to every user except those in a list (let's call that list "Admins", with a column called "Admin" set as a person column), but I can't figure out how to get the lookup() function to work properly. This is what I have so far in the formatting rule:
(current user is the Nintex Common Property) And this is giving me an error. Could anyone point me in the right direction with this? I have studied the documentation for the lookup() function and can't determine what I'm doing wrong.
Solved! Go to Solution.
I believe I was able to come up with a solution for what you are describing. I'm assuming a couple of things here:
First thing I had to do was to add a Calculated Value field to form to get the Admin's PreferredName value from user profiles. Name the field something like "UserNameField" and configure the formula field like this:
userProfileLookup(Current User, "PreferredName")
Next create another Calculated Value field on the form and name it something like "ValueID". This field will perform a lookup on the Admins list and return the list item ID if that current user is found in the list. Configure the formula in the field like this:
lookup("Admins", "Admin", UserNameField, "ID")
You place rules on these two fields to hide them of the form later.
Next place a rule on the panel you want to hide so that if the ValueID field is empty, then the panel is hidden. Use this in the rule Condition field:
Give that a try and let me know if that works.