cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

Filter PowerApp by [ME]

i am trying to filter my power app so that when a end-user logs in, they only see the items assigned to them.

If tried to set to Onvisible on the main screen to  Set(ThisUser,User().FullName)

 

The on Browse Gallery   Filter([@'Acknowledgement Log'],ThisUser=User().FullName)

 

Doesn't work.

 

This is my data:

snip1.gif

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User III
Super User III

Re: Filter PowerApp by [ME]

Hi @km2,

 

Change the formula as below:

Filter([@'Acknowledgement Log'],varUser.Email = <<sharepointColumnName>>.Email)

 

I am assuming varUser is a variable you are setting at onVisible property of the screen as below:

Set(varUser,User())

 

I hope this resolved your issue if you see any challenge/need further help let me know I am always happy to help.

 

Regards,
Krishna
If this post helps give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Proud to be a Super User!

Regards,
KrishnaV
If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members / new members of the community.

View solution in original post

17 REPLIES 17
Highlighted
Super User III
Super User III

Re: Filter PowerApp by [ME]

@km2 

Use this code in your App's OnStart property

Set(varUser,User())

 

Then use this code in your FILTER function for the browse gallery.

Filter([@'Acknowledgement Log'],AssignedTo.Email=varUser.Email)

 

Note1: Always filter based on email since it is a unique identifier.  Full Name can have duplicates.

Note2: Ensure the Assigned field is a Person type column in SharePoint.

 

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Highlighted
Super User III
Super User III

Re: Filter PowerApp by [ME]

Hi @km2 ,

 

Change your formal as below:

 

To a gallery:
Filter([@'Acknowledgement Log'],Title=User().FullName) // I am assuming you are populating FullName of the user in Title Field of the list.

if not your filter should be:
Filter([@'Acknowledgement Log'],AssignedTo.Email=User().Email)
if you want to set it to a form you need to ensure that you are getting only one record, so:
First(Filter([@'Acknowledgement Log'],Title=User().FullName))// I am assuming you are populating FullName of the user in Title Field of the list.

if not your filter should be:
Filter([@'Acknowledgement Log'],AssignedTo.Email=User().Email)

 

 

I hope this resolved your issue if you see any challenge let me know I am always happy to help.

 

Regards,

Krishna
If this post helps give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.

 


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Proud to be a Super User!

Regards,
KrishnaV
If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members / new members of the community.
Highlighted
Helper I
Helper I

Re: Filter PowerApp by [ME]

With either one of the suggestions i get a 'delegation warning' now.

Highlighted
Super User III
Super User III

Re: Filter PowerApp by [ME]

ok in that case use as below:

Set(varUser,User())
To a gallery:
Filter([@'Acknowledgement Log'],Title=varUser.FullName) // I am assuming you are populating FullName of the user in Title Field of the list.

if not your filter should be:
Filter([@'Acknowledgement Log'],AssignedTo.Email=varUser.Email)

 

I hope this resolved your issue if you see any challenge let me know I am always happy to help.

Regards,

Krishna
If this post helps give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Proud to be a Super User!

Regards,
KrishnaV
If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members / new members of the community.
Highlighted
Super User III
Super User III

Re: Filter PowerApp by [ME]

@km2 

My response should not produce a delegation warning.  Ensure you have set the varUser in OnStart.

 

Are you using Excel?  That can cause the delegation issue.

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Highlighted
Helper I
Helper I

Re: Filter PowerApp by [ME]

one works now without errors.  Next problem, nothing is showing up 🙂  When i use whatever default filters were in there, it showed all of it.

 

Not using excel, using data from a SharePoint List.

Highlighted
Super User III
Super User III

Re: Filter PowerApp by [ME]

is it possible to show a sample data on your list (may be you can hide the confidential data) so that I can help you better with the filter.

 

Regards,
Krishna

If this post helps give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Proud to be a Super User!

Regards,
KrishnaV
If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members / new members of the community.
Highlighted
Super User III
Super User III

Re: Filter PowerApp by [ME]

@km2 

There is no matching email in your list most likely.

Highlighted
Helper I
Helper I

Re: Filter PowerApp by [ME]

So, im realizing for whatever reason my person/group column 'Assigned To' is not coming into Power apps for use.  Title (which is hidden from the list) snip2.gifalso has the peoples names but that is just a regular text field.  

 

 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (6,740)