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 formula on OnSt...
Power Apps
Answered

Filter formula on OnStart Property

(0) ShareShare
ReportReport
Posted on by 5

What would be the way to use the OnStart Property on a Canvas App to filter out Users so that the record would be connected to the logged in user as a Owner?

Categories:
I have the same question (0)
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @samcorg07 

    Set(Useremail, User().Email) and use Useremail to filter your Data source throughout your app. 

  • Verified answer
    v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @samcorg07,

    Do you want to display records only by current user?

     

    If so, I think @Drrickryp has given a correct direction. I just do something extra.

    If you have a column containing the owner email in your data source, you just need to create a collection to include the records by current user.

    Set the OnStart property of the App as below:

    ClearCollect(colUser,Filter(DataSource,UserColumn=User().Email))

    Then apply this collection to the place where you want to refer to the data source.

  • samcorg07 Profile Picture
    5 on at

    What if I wanted to just use the Owner not Usermail? Also, I'm not using any SharePoint

  • Verified answer
    v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @samcorg07,

    You need to use the AsType function to compare the 'Full Name'. However, the Office 365 full name could have middle name whereas Dataverse does not include the middle name, so you might have issues comparing on full name. A safer comparison is to use Email instead. 

     

    Remember to connect the Users table as a data source in your canvas app in order for the filter to work.

    Filter(Accounts, AsType(Owner, Users).'Primary Email' = User().Email)

    Note that Accounts is my data source, you should replace it with your table name.

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 536

#2
WarrenBelz Profile Picture

WarrenBelz 426 Most Valuable Professional

#3
Haque Profile Picture

Haque 305

Last 30 days Overall leaderboard