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

Notifications

Announcements

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
    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
    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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard