Forum Discussion
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
------------------------------
using contains instead of includes fixed it for me. Thanks so much for your help. here is the completed formula for anyone else that may need it:
var text activeusers = ToText(UserListToEmails([User - Current - User and Covered]));
Contains([Users - Active For - Final],ToUser((Part($activeusers,1,";")))) or
Contains([Users - Active For - Final],ToUser((Part($activeusers,2,";")))) or
Contains([Users - Active For - Final],ToUser((Part($activeusers,3,";")))) or
Contains([Users - Active For - Final],ToUser((Part($activeusers,4,";")))) or
Contains([Users - Active For - Final],ToUser((Part($activeusers,5,";")))) or
this just continues until you hit the max users in a userlist, which is 20.
------------------------------
Drew Voge
------------------------------