auto-populate AssignedTo with current user if member of group, otherwise leave field empty

  • 31 March 2020
  • 4 replies
  • 11 views

Badge +3

Hello, if someone can help me figure out how to arrange a formula to get this working, I would be so grateful. 

I have a people picker control named "AssignedTo" that I would like to auto-populate with "CurrentUser" IF the current user is a member of the "AdminGroup." If current user is not a member of AdminGroup, then this AssignedTo field should be left empty.

I'd like to use out of the box functionality please, I don't know how to use script yet. I am using Nintex Forms 2016 on-prem and the form is classic.

Thanks in advance!


4 replies

Userlevel 6
Badge +22
Hi,

If you set the default value of the control to:
fn-If(fn-IsMemberOfGroup(Current User,"GroupName"),Current User,"") does that work?
Badge +3

Hi Simon!

 

Thank you so much for responding to me. I tried the formula you gave me, and it didn’t work at first. So finally I checked where I knew I had used the IsMember… formula before, and saw that I needed to correct just that little part.

So I used this: fn-If(fn-IsMemberOfGroup("GroupName"),Current User,"")

and it worked perfectly. Thank you so much for showing me how those fit together. I sincerely appreciate your help.

 

Thanks so much, 

Lynn

Userlevel 6
Badge +22
Oh sorry about that. I meesed up the parameters for the fn-IsMemberOfGroup function. Glad I was at least able to point you in the right direction.
Badge +3

Yes, your reply was most helpful.  I am so very grateful for the kindness and generosity here in this forum.  It's such a blessing for newbies like me! :smileyvery-happy:

Reply