Skip to main content
Nintex Community Menu Bar

Enable Field on Multiple Conditions

  • December 16, 2019
  • 5 replies
  • 28 views

Forum|alt.badge.img+8

I have a field on a Nintex form that I want to enable based on 2 conditions.

 

1. Current user is member if a specific SP group

2. Current user is the same as in an assignee field on the same form

 

The only way to accomplish the first validation is in the control settings, but I cannot get multiple conditions to work. Anyone know how to do this?

5 replies

Forum|alt.badge.img+8
  • Author
  • December 16, 2019

After I posted my question I found this thread. I tried using the fn-IsMemberOfGroup() function in a rule but it doesn't seem to work. I thought maybe it was because my group is in a list field and not hard coded, but I tried hard coding it and that doesn't work either. Help!

 

https://community.nintex.com/t5/Nintex-for-SharePoint/Member-of-Group-and-Formatting-Rules/m-p/46206#M38286


Forum|alt.badge.img+8
  • Author
  • December 16, 2019

Actually when I used the function alone with the hard coded group name it worked! Apparently it will not resolve using a "Person or Group" field. I will create a second text field to hold the group name and see if that will work.


Forum|alt.badge.img+12
  • Scholar
  • December 16, 2019

@rogerb 

 

  1. I think the function check on form load only
  2. Use calculated control to display the current user if you need and then add another calculated control and use If statement to check if current user and assignee are same...using true or false you can build your logic

 

 


Forum|alt.badge.img+8
  • Author
  • December 16, 2019

Can you supply some syntax for the second calculated control where you have the If statement and true/false logic?


Forum|alt.badge.img+12
  • Scholar
  • December 16, 2019

@rogerb ....In my case I had a PG control and have named as spgroup. I've then added a calculated control.....data type as string.....calculate formula in new and edit mode....you can also re-calculate in view mode if you want. Make sure you use Named Control and not Item Property for your assignee field.

 

Formula is:

 

If(equals(userProfileLookup(Current User, "PreferredName"), userProfileLookup(SPGroup, "PreferredName")), True, False)