Forum Discussion
I fixed (I believe) one part where you need to wrap the individual user values in a touserlist() to compare to the other user list. Being said, it works sometimes, but not always. Here's what i figured out so far:
If userlist1 has 4 users in it, and the formula tests 4 parts of list1, it works correctly.
If userlist has less than 4 users in it, and the formula tests 4 parts of list 1, it returns positive no matter what.
Basically, it only seems to work if the number of "tests / comparisons" you make is equal to the number of users in the userlist1. Make sense?
This is what the formula currently looks like:
var text activeusers = ToText(UserListToEmails([User - Current - User and Covered]));
Includes([Users - Active For - Final],ToUserList(ToUser((Part($activeusers,1,";"))))) or
Includes([Users - Active For - Final],ToUserList(ToUser((Part($activeusers,2,";"))))) or
Includes([Users - Active For - Final],ToUserList(ToUser((Part($activeusers,3,";"))))) or
Includes([Users - Active For - Final],ToUserList(ToUser((Part($activeusers,4,";")))))
------------------------------
Drew Voge
------------------------------
Kind of. You could try and swap out 'Includes' with contains() to avoid the userlist transformation - thats what I commonly would use instead of Include. I was going through seeing if there was a more elegant solution specific to two user lists before I responded and found that. As a secondary measure you could check first to see if there actually is a user in that position before checking for contains. Something like:
var text list = ToText(UserListToEmails([user list 1]));
if( trim(Part($list,1,";")) != "", Contains([user list 2],ToUser(Part($list,1,";"))), false) or
if( trim(Part($list,2,";")) != "", Contains([user list 2],ToUser(Part($list,2,";"))), false) or
if( trim(Part($list,3,";")) != "", Contains([user list 2],ToUser(Part($list,3,";"))), false) or
if( trim(Part($list,4,";")) != "", Contains([user list 2],ToUser(Part($list,4,";"))), false) or
if( trim(Part($list,5,";")) != "", Contains([user list 2],ToUser(Part($list,5,";"))), false) or
if( trim(Part($list,6,";")) != "", Contains([user list 2],ToUser(Part($list,6,";"))), false) or
if( trim(Part($list,7,";")) != "", Contains([user list 2],ToUser(Part($list,7,";"))), false) or
.....................
------------------------------
Chayce Duncan
------------------------------