Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Filter Issue Office365Users.User()

(1) ShareShare
ReportReport
Posted on by 209
Hi!  Thank you for your assistance!  I have a PA looking at SharePoint List records.  One column is Location and I want the filter to only get records where the Location selection equals or is in the Power App user's Azure profile.  What I have is sound, but I am not getting the record I should.  Thank you!
 
Sort(
    Filter(
        'Limited-Term Personnel',
        Office365Users.UserProfileV2(User().EntraObjectId).officeLocation in 'Location' &&
        (
            SearchInput1_2.Text in 'First Name' ||
            SearchInput1_2.Text in Title ||
            SearchInput1_2.Text in 'Grade Level/Content Area' ||
            SearchInput1_2.Text in 'ECASD Staff'
        )
    ),
    Role.Value,
    SortOrder.Ascending
)
 
Categories:
  • Verified answer
    WarrenBelz Profile Picture
    146,618 Most Valuable Professional on at
    Filter Issue Office365Users.User()
    Every element of that filter is not Delegable apart from maybe the bit that needs fixing - I am assuming from your screenshot that Location (not a good name for a field as it is a Reserved Word in Power Apps) is a Choice field (hopefully a single choice).
    With(
       {
          _Data:
          Filter(
             'Limited-Term Personnel',
             Location.Value = Office365Users.UserProfileV2(User().EntraObjectId).officeLocation
          )
       },
       Sort(
          Filter(
             _Data,
             (
                SearchInput1_2.Text in 'First Name' ||
                SearchInput1_2.Text in Title ||
                SearchInput1_2.Text in 'Grade Level/Content Area' ||
                SearchInput1_2.Text in 'ECASD Staff'
             )
          ),
          Role.Value,
          SortOrder.Ascending
       )
    )
     
    Please click 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 giving it a Like.
    MVP (Business Applications)     Visit my blog Practical Power Apps    Buy me a coffee

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,618 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,957 Most Valuable Professional

Leaderboard