Hello everyone,
I'm trying to filter my app home screen to show certain boxes according to the assigned role of the user from a sharepoint list. The sharepoint columns are multi-person columns. I used the "in" operator mostly. However, I ran into a problem with user emails that were not completely unidentical for example ejideofor@abc.com and eofor@abc.com or kukaoha@abc.com and kcukaoha@abc.com What happened is that it seems that eofor is "in" ejideofor, therefore it displays the result that is meant to be for ejideofor to eofor. I believe the "=" operator will help to solve the problem but i'm not exactly sure how, considering that it's a multi-person column. I'll need to compare each email in the multi-person column to the User().Email. This is the code I have now...
//This filters the home menu according to the role of the logged in user.
If(
User().Email = varVoucherRolEmail,
Filter(
colHomeMenu,
varVoucherRoles in SeenBy
),
User().Email in varDeptHead,
Filter(
colHomeMenu,
varDeptHead in SeenBy && User().Email in varDeptHead
),
User().Email in varMemEmails && !(User().Email in varUnitHead),
Filter(
colHomeMenu,
varMemEmails in SeenBy && User().Email in varMemEmails
),
User().Email in varMemEmails && User().Email in varUnitHead,
Filter(
colHomeMenu,
varMemEmails in SeenBy && User().Email in varMemEmails || (varUnitHead in SeenBy && User().Email in varUnitHead)
),
Filter(
colHomeMenu,
varUnitHead in SeenBy && User().Email in varUnitHead
)
)
varUnitHead, varDeptHead and varMemEmails are each concatenated into a string for example varUnitHead is Concat(ThisItem.UnitHead, Email, "; ") and so on. Thank you so much.