Skip to main content
Nintex Community Menu Bar

Forms rule to invalidate field if contains value from other field person or group

  • February 14, 2020
  • 4 replies
  • 89 views

Forum|alt.badge.img+1

I have two fields on a Nintex form: Document Owner and Document Approver(s). Both are person or group fields. 

I need to create a rule that if the Document Approver(s) field contains the same name as the Document Owner field, it becomes invalidated. The Document Approver(s) field is not restricted to only one person.

Essentially, I need to limit a person from being both an owner and approver for a document and would like to do this through rules on the Nintex Form. 

I can make it work with only one name in the Document Approver(s) field using this rule: DocOwner === DocApprovers, but that validates with equals, not contains. 

4 replies

Simon Muntz
Nintex Partner
Forum|alt.badge.img+23
  • Nintex Partner
  • February 17, 2020
Hi,

Have you tried the contains runtime function? contains(string, element)

Forum|alt.badge.img+1
  • Author
  • February 17, 2020

Hello, thank you for reponding. I have, but don't know what to put in as the element. 

 

=contains(DocOwner, "?"). DocOwner is the Named Control, and I tested with the element as both the Item Propery, "Doc Owner" and the Named Control, "DocOwner" and neither worked. 

 

=contains(DocOwner, "Doc Owner")

=contains(DocOwner, "DocOwner")  


Simon Muntz
Nintex Partner
Forum|alt.badge.img+23
  • Nintex Partner
  • February 18, 2020
contains(DocApprovers,DocOwner)

Forum|alt.badge.img+1
  • Author
  • February 18, 2020
Perfect, thank you! I shall now go brush up on formula basics in shame :)
Appreciate your quick responses and help.