web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Role Based Home Screen...
Power Apps
Unanswered

Role Based Home Screen View

(0) ShareShare
ReportReport
Posted on by

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.

Categories:
I have the same question (0)
  • Ami K Profile Picture
    15,687 Super User 2024 Season 1 on at

    @AdaEloka - consider using the exactin function instead of in.

  • AdaEloka Profile Picture
    on at

    Hi @Amik ,

    I already tried exactin, it still returns true since "eofor" is an exact match as a substring within the string "ejideofor."

     

    I need something that will return false when the two strings are compared. I strongly believe that the = operator will do the trick...only I'm not sure how to use it in the code I already have...

  • Ami K Profile Picture
    15,687 Super User 2024 Season 1 on at

    Hi @AdaEloka - I do not think the problem has anything to do with email addresses partially sharing same the sequence of characters, I suspect it is your Variable.

     

    As I understand it, you're using the below function to generate a single line string of each email attribute in your Mult-Choice SharePoint People column.

     

    Concat(ThisItem.UnitHead, Email, "; ") 

     

    The purpose of the in function is to check if a string is exists within another text string or Table. You're doing the former, when what you should be doing is the latter. You should be checking a Table of email addresses, with each email address listed as a new line in that table.

     

    To populate your Variable with a table of email addresses, rather than a single line concatenated string, you can leverage the split function:

     

    Set(
     varUnitHead,
     Split(
     Concat(
     ThisItem.'UnitHead',
     Email & ";"
     ),
     ";"
     )
    )

     

    Or as a Context Variable if that's what you're using:

     

    UpdateContext(
     {
     varUnitHead: Split(
     Concat(
     ThisItem.'Unit Head',
     Email & ";"
     ),
     ";"
     )
     }
    )

     

    Consider this approach and let me know if that solves the problem.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 529 Most Valuable Professional

#2
Haque Profile Picture

Haque 230

#3
Kalathiya Profile Picture

Kalathiya 217 Super User 2026 Season 1

Last 30 days Overall leaderboard