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 / Filter not working fin...
Power Apps
Suggested Answer

Filter not working fine for multiselect person or group column

(2) ShareShare
ReportReport
Posted on by 144
I have a submit button. I need to show submit button if current user is in List group members column. The list group members is a multiselect person or group column. I tried below code but its throwing error. 
 
Group Name in Groups list is concatenated with Country and hence i am using Split function. For eg: California will be shown as "California - United States"
 
May i know where i am going wrong?
 
Submit Button Visible
User().Email in Filter(Groups,Split('Group Name',"-")=ThisItem.Location.Value,'Group Members'.Email)
 
I have the same question (0)
  • Suggested answer
    11manish Profile Picture
    3,849 Super User 2026 Season 2 on at
    If possible, avoid parsing the Group Name using Split(). Instead, store Location and Country in separate columns. This simplifies the formula, improves readability, and makes the app easier to maintain.
     
    Use the following formula for the Visible property of the Submit button:
    !IsBlank(
        LookUp(
            LookUp(
                Groups,
                Trim(First(Split('Group Name', "-")).Value) = ThisItem.Location.Value
            ).'Group Members',
            Lower(Email) = Lower(User().Email)
        )
    )
     
  • Suggested answer
    WarrenBelz Profile Picture
    156,271 Most Valuable Professional on at
    I am assuming here that the Location can be anywhere in that delimited string and if this is the case, you do not need Split as you need to use the in filter anyway (the whole thing is not Delegable with Split, so this is simpler). The With() statement at the top is only to mask the Delegation warning (this will not work fully if you have more that your Data Row Limit records in Groups) The below wil return true or false depending on whether the user's email is in that returned record set
    With(
       {_Groups: Groups},
       User().Email in Filter(
          _Groups,
          ThisItem.Location.Value in _Groups.'Group Name'
       ).'Group Members'.Email
    )
    Please Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider answering Yes to Was this reply helpful? or give it a Like
    Visit my blog
    Practical Power Apps    LinkedIn  
     
  • Poweruser32490 Profile Picture
    144 on at
    Hi @WarrenBelz,
     
    I tried the formula which you gave but it throws error. Also how to implement the split function in below case.
     
    My location is named as "California - United States" in Groups list whereas i need only California.
     
     Trim(First(Split('Group Name', "-")).Value) = ThisItem.Location.Value
     
     
  • Suggested answer
    Haque Profile Picture
    4,004 Super User 2026 Season 2 on at
     
    Let's see what you need, what you did and what could be done:
     
    You have mentioned the list group members is a multiselect person or grouip colum - so logically it should returns a table of user records - not a singgle record.
     
    User().Email in Filter(Groups,Split('Group Name',"-")=ThisItem.Location.Value,'Group Members'.Email)
    Our target is to check if the current user is in the multi-selet column,  so we need to check if the eamil (current user email) exists in the table of eamils, not on a single record of email.
     
    Did you check what this expression Split('Group Name',"-") returns? I geuss it returns a table, and if it returns a table, we cannot directly compare it to string wiht equal sign (=).  [User().Email in Filter(Groups,Split('Group Name',"-")=ThisItem.Location.Value,'Group Members'.Email)]
     
    Oner more thing - based on the requirement, we need to extract the part before the hyphen from 'Group Name' and compare it to ThisItem.Location.Value.

    Let's solve last thing first: 

     

     "My location is named as "California - United States" in Groups list whereas i need only California." - your one problem solved.

     

    Let's make sure submit button becomes visible if we find at least one match with the given user. Let's rewrite your expression like below:

    CountRows(
        Filter(
            Groups,
            Left('Group Name', Find(" -", 'Group Name') - 1) = ThisItem.Location.Value &&
            User().Email in 'Group Members'.Email
        )
    ) > 0
    
    //If  CountRows(...) > 0 returns true, means we found at least one match, then show the button.

    Filter returns groups by matching the location (ThisItem.Location.Value).

    Left and Find extracts state name from the combined group [Left('Group Name', Find(" -", 'Group Name') - 1)], as I explained figuratively.

    Then we check if the current user's email is in the 'Group Members' emails [User().Email in 'Group Members'.Email].

    Finally, CountRows returns true if user is a member of at least one matched gropu - show the button.


    I am sure some clues I tried to give. If these clues help to resolve the issue brought you by here, please don't forget to check the box Does this answer your question? At the same time, I am pretty sure you have liked the response!

     

  • Suggested answer
    WarrenBelz Profile Picture
    156,271 Most Valuable Professional on at
     
    Assuming: -
    • 'Group Name' is a Single Line of Text with the Location and Country separated by " - "
    • 'Group Members' is a Multi-value Person column
    • Both are in the Groups SharePoint List
    • Location is a Single Value Choice or Lookup column in the current list viewed in the Gallery
    • You want to check that the current User is in the 'Group Members' field of  the current Location record in Groups
     then this should work: -
    With(
       {
          _Groups: AddColumns(
             Groups,
             _Location,
             First(Split('Group Name', " - ")).Value
          )
       },
       !IsEmpty(
          Filter(
             _Groups,
             ThisItem.Location.Value in _Location && User().Email in 'Group Members'.Email
          )
       )
    )
     
    This will also work
    With(
       {
          Groups: AddColumns(
             Groups,
             _Location,
             First(Split('Group Name', " - ")).Value
          )
       },
       CountRows(
          Filter(
             _Groups,
             ThisItem.Location.Value in _Location && User().Email in 'Group Members'.Email
          )
       ) > 0
    )
     
    Please Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider answering Yes to Was this reply helpful? or give it a Like
    Visit my blog
    Practical Power Apps    LinkedIn  
     
  • WarrenBelz Profile Picture
    156,271 Most Valuable Professional on at
    A quick follow-up to see if you received the answer you were looking for. Happy to assist further if not.
     
    Please Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider answering Yes to Was this reply helpful? or give it a Like ♥
    Visit my blog
    Practical Power Apps    LinkedIn   

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 410 Most Valuable Professional

#2
11manish Profile Picture

11manish 159 Super User 2026 Season 2

#3
sannavajjala87 Profile Picture

sannavajjala87 89 Super User 2026 Season 2

Last 30 days Overall leaderboard