cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
New Member

Filter and Search issues

Hello,

 

I'm creating an App for work that reads/updates information from a sharepoint list (on Office 365) call 'Staff Lunches' I want the BrowserGallery to filter by 'Staff_Name' so Staff members will only see their items when running the App.

 

When I set the Items property of the BrowserGallery to just the table name it displays all the items in 'Staff Lunches' -correct.

When I seach or filter the items such as Filter('Staff Lunches',User().FullName = Staff_Name)  it doesn't return all of the expected items - see screen shot Missing an itemMissing an itemIf I change the filter to Filter('Staff Lunches',"Martin Fitzsimons" = Staff_Name) it displays the missing itemsCorrect.PNG

 

 

I've checked the items in the Staff_Name column to make sure it's correct and it is. 

Any pointers on what I'm missing would be much appreciated.

 

 

2 REPLIES 2
Highlighted
Anonymous
Not applicable

Re: Filter and Search issues

Very strange behavior.

Might be related to User() function but it is a longshot.

Try to do the following in your first Screen1.OnStart add this function (or add this to the screen where you show the gallery in the OnVisible property)

 

Set(
  _UserName,
  User().FullName
)

Now in your Gallery.Item function put this:

Filter('Staff Lunches',_UserName = Staff_Name)

Allso Check if in a label.Text User().FullName gves exactly the same result as "Martin Fitzsimons"

Highlighted
New Member

Re: Filter and Search issues

Hey, thanks for the reply. Yes it is. Did try the set idea before and retried it but it only returns _UserName as blank. I've been told to shelve this project for now. So I won't be carrying on the Dev work. Thanks for your help though.

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

Top Solution Authors
Top Kudoed Authors
Users online (9,187)