Skip to main content
Question

Matching part of a user-list to another user list

  • October 31, 2023
  • 0 replies
  • 211 views

Forum|alt.badge.img+5

I have two list-user fields - List1 and List2

I want to compare these two fields in a formula-checkbox field and have the result be true if ONE OR MORE user(s) from list1 appears in list2. 

Example 1:

List1 - user1,user2

List2 - user2,user3,user4

Result would be true because user2 exists in both list1 and list2

Example 2:

List1 - user1,user2

List2 - user1,user2,user3,user4

Result would be true because one or more (both) user1 and user2 exist in both lists

Example 3:

List1 - user1,user2

List2 - user3,user4,user5

Result would be false

Any help?



------------------------------
Drew Voge
------------------------------
This topic has been closed for replies.

Forum|alt.badge.img+9
  • Quickbase Alumni
  • October 31, 2023

It's not ideal - but you'll essentially have to break out list1 and see if any of them exist in list 2 using a combo of functions. Best I can come up with quickly is: 

var text list1 = ToText(UserListToEmails([user list 1]));

Includes([user list 2],ToUser(Part($list1,1,";"))) or

Includes([user list 2],ToUser(Part($list1,2,";"))) or

Includes([user list 2],ToUser(Part($list1,3,";"))) or

Includes([user list 2],ToUser(Part($list1,4,";"))) or

....

repeat until you hit what you imagine is the practical end of the number of users you might expect. 



------------------------------
Chayce Duncan
------------------------------