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 / If statement with filter
Power Apps
Answered

If statement with filter

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I want a gallery that displays items that have been saved by a user, saved to SP list 'Pinned Applications'. If a user doesn't have any saved items then all the items from SP list 'Application Master List' should be displayed, but my formula isn't working correctly:

 

Gallery Items

If(CurrentO365User.Id in 'Pinned Applications'.UserID, Filter('Pinned Applications', UserID = CurrentO365User.Id), 'Application Master List')

The gallery is showing all the applications on the 'Application Master List' and not just the ones that are on the Pinned Application list.

 

Variables: CurrentO365User = Office365Users.MyProfile()

UserID is the primary key

Categories:
I have the same question (0)
  • Verified answer
    timl Profile Picture
    36,785 Super User 2026 Season 1 on at

    Hi @Anonymous 

    I would try the following to see if that returns the correct result.

    If(CountIf('Pinned Applications', UserID = CurrentO365User.Id) > 0, 
     Filter('Pinned Applications', UserID = CurrentO365User.Id), 
     'Application Master List'
    )
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    This worked! Appreciate the assistance - what an amazing community.

  • timl Profile Picture
    36,785 Super User 2026 Season 1 on at

    Glad this worked for you @Anonymous!

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!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 541

#2
WarrenBelz Profile Picture

WarrenBelz 434 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 289

Last 30 days Overall leaderboard