Skip to main content
Nintex Community Menu Bar

Nintex form - hide panel from current user if it is same as selected in people picker

  • January 14, 2015
  • 13 replies
  • 41 views

Forum|alt.badge.img+4

Hi!

I have a problem with people picker field.

Q: How can I hide certain panel from current user if she/he is the same as selected in people picker -field?

When setting up a formula in condition there's not people picker control in Named controls even though it is named?

Urgent help needed happy.png

13 replies

Forum|alt.badge.img+4
  • Author
  • January 14, 2015

Sorry, can't get it to work.  Let's say people picker field is called Maintenance and formula is...

({ItemProperty:Maintenance})=(Current user)

this is not working...


Forum|alt.badge.img+17
  • Nintex Partner
  • January 14, 2015

Make sure you are using == in the comparison


Forum|alt.badge.img+4
  • Author
  • January 14, 2015

({ItemProperty:Maintenance})==(Current user) not working ...:(


Forum|alt.badge.img+9
  • Nintex Employee
  • January 19, 2015

Hi Sari,

The reason {ItemProperty:Maintenance} is not working is due to the item property field being empty until the item is actually created.

I believe you may be on an older build of Nintex Forms, as more recently, Form Designers can now use the People Picker named control.

I recommend upgrading to the latest build of Nintex Forms, located here: Product Downloads

Thank you,

Sean Fiene


Forum|alt.badge.img

Your values do not equal mostly likely because your people picker value truly is domainusername  and your current user value is "I:0#.w|username".   You can use the runtime function substring with userEquals like this:

userEquals(substring(current user, 7, 50), PeoplePicker ControlName)


Forum|alt.badge.img+17
  • Nintex Partner
  • June 1, 2015

You can use the format value feature to get the email values with using substring. See Using the Format this Value Feature 


Forum|alt.badge.img+5
  • June 23, 2015

Hi,

I was wondering if there is any answer to this? I have the same issue with 365. It would be best if I could compare CurrentUser to Name text box rather than people picker, but if I could just get it working at all it'd be great!!

Thanks happy.png


Forum|alt.badge.img+7
  • February 15, 2016

Hi,

Just had to do something similar in on premise but it should be ok in O365 too.

I could only get this to work in script, I ended up creating a hidden field on the form to store the current user then I could compare it when parsing the people picker field using the code snippet below.

var people = NWF$("#" + peoplepickerid).val();

var peopleArray = JSON.parse(people);

NWF$(peopleArray).each(function () {        

//you can get at the login via NWF$(this)[0].id or email from NWF$(this)[0].email 

});    

Jan


Forum|alt.badge.img+1
  • March 14, 2017

Give name to that control and based on that create rule


Forum|alt.badge.img+2
  • April 12, 2017

@Michael your formula is good, unfortunately the created by value is not coming at all, tried to put the values in single line text box.


Forum|alt.badge.img+14
  • Scholar
  • April 12, 2017

Hi ‌,

were you able to resolve your issue?

if so, could you mark the answer that provides the proper solution as correct?

#BRGreview


Forum|alt.badge.img+4

Please I need ur help , if I have Nintex form and I need only who create the item can edit the controls???


Forum|alt.badge.img+1
  • April 24, 2017

Try this one. In List - >Go to list settings - > Click Advanced Settings 

202118_pastedImage_4.png

Click Save.