cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Filtering list by currrent user not working

I am just looking for what I thought would be a simple way of filtering by logged on user. I found this page that said to create a data connection to Office 365 users and add the following but it is not working. I am not married to the this current way of doing it so if you can suggest a better way to it please let me know.

 

This is suppose to get my profile display name and ensure that it equals the field in Officer Name showing only my entries into the system.

 

SortByColumns(Filter('Individual-Time', Office365Users.MyProfile().DisplayName = Officer_x0020_Name, StartsWith(ComplianceAssetId, TextSearchBox1.Text)), "ComplianceAssetId", If(SortDescending1, Descending, Ascending))
1 ACCEPTED SOLUTION

Accepted Solutions
v-yamao-msft
Community Support
Community Support

Hi msmith,

 

Please take my code for a reference.

 

In my list, there is a Person or Group column named “Approved by”. I created connections to both SharePoint list and Office 365 users.

 

On the gallery, set the Items property of the gallery as:

SortByColumns(Filter(List1,Office365Users.MyProfile().DisplayName=Approved_x0020_By_x003f_.DisplayName),"Title",If(SortDescending1,Descending,Ascending))

 

Then only the items that the display name of column “Approved by” are equal to current user’s will be shown on the app.

 

Please try it on your side and feel free reply if you need more help.

 

Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-yamao-msft
Community Support
Community Support

Hi msmith,

 

Please take my code for a reference.

 

In my list, there is a Person or Group column named “Approved by”. I created connections to both SharePoint list and Office 365 users.

 

On the gallery, set the Items property of the gallery as:

SortByColumns(Filter(List1,Office365Users.MyProfile().DisplayName=Approved_x0020_By_x003f_.DisplayName),"Title",If(SortDescending1,Descending,Ascending))

 

Then only the items that the display name of column “Approved by” are equal to current user’s will be shown on the app.

 

Please try it on your side and feel free reply if you need more help.

 

Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Anonymous
Not applicable

Here is a capture of what happens. I must just have this in the wrong format or something.

Screen-Shot-Powerapp.jpg

Hi msmith,

 

What’s the column type of “Officer_x0020_Name”? Is it a Person or Group column or a Text column?


If it is a Person or Group column, you may configure it likes Officer_x0020_Name.DisplayName, while if it is a Text column, Officer_x0020_Name should be ok.


Please try it on your side.

 


Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

That is what I missed, thank you!!

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (997)