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

Filtering Gallery by name within a table

Hello.

 

I just try to finish my first app with PowerApps and i have one last thing to figure out:

 

I connected Outlook to the app, so I can display the name of the current company-employee.

I connected a tasklist as a 'gallery' from sharepoint to the app.

In the Sharepoint tasklist employees are set as a table (with some attributes), so I can display them just a s a dropdown [AssignedTo.DisplayName].

Now i want to filter the tasks in the gallery to see just the tasks, that belongs to the current employee [User().FullName].

 

I tried this:

Filter('gallery'; Dropdown2.Selected.Value=User().FullName)

 

It doesn't work, because [User().FullName] is a text and [Dropdown2.Selected.Value] comes from a table.

Is there something I can do to solve this problem?

 

Thank you.

 

 

4 REPLIES 4
Super User
Super User

Re: Filtering Gallery by name within a table

If you want the gallery to display just tasks assigned to the current user then the Items property of the gallery would look something like this:

 

Filter(TaskList, AssignedTo.Email = User().Email)


--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly.
If you thought this post was helpful, please give it a Thumbs Up.
Anonymous
Not applicable

Re: Filtering Gallery by name within a table

Thanks for the answer.

 

I tried the solution

 

Filter(Gallery1, AssignedTo.Email = User().Email)

in all variants - it doesn't work.

Even

Filter(Gallery1, AssignedTo.Email = "MyEmail")

 

or

Filter(Gallery1, AssignedTo.Displayname = User().Fullname)

 

I think there must be a trick to convert [AssignedTo.DisplayName] into a text.

powerapps comm.jpgThen [User().Fullname] can be compared with [AssignetTo.DisplayName].

Super User
Super User

Re: Filtering Gallery by name within a table

If this formula is going into the Items property of Gallery1 then "Gallery1" shouldn't be listed in the filter. The first parameter of the Filter should be the SharePoint Task List.



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly.
If you thought this post was helpful, please give it a Thumbs Up.
Anonymous
Not applicable

Re: Filtering Gallery by name within a table

Yes, sorry. The first parameter is of course  'SharePoint task list'.

But I still can't filter the 'task list' by the user's name.