cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Results of lookup function to show/hide a panel

Jump to solution

Hi all,

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:

lookup("Admins","Admin",Current User,"Admin",true)

(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.

Thanks.

Labels: (3)
0 Kudos
Reply
2 Replies
Workflow Hero

Re: Results of lookup function to show/hide a panel

Jump to solution

Hi Zac,

I believe I was able to come up with a solution for what you are describing.  I'm assuming a couple of things here:

  • Users only appear in the Admins list once.
  • You're using Nintex Forms 2013.

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:

isNullOrEmpty(ValueID)

Give that a try and let me know if that works.

Eric

Reply
Not applicable

Re: Results of lookup function to show/hide a panel

Jump to solution

Great suggestions Eric

Reply