Showing results for 
Search instead for 
Did you mean: 
Regular Visitor

Navigation Problems with BrowseGallery of "Top Items" from Sharepoint List

Hello and Good Evening,


Long-term lurker for about a year, and about this time last year I began my current development. I have built a custom gallery app that is powered by a Sharepoint List as the item database. The main BrowseGallery works without a hitch- that is, clicking an item in the BrowseGallery list Selects the Parent, Sets the correct Item, adds +1 to the "totalclicks" to track my Top 10 Entries, and Navigates accordingly:




Set(currentRecord, LookUp(SHAREPOINT_DB, TOPIC = ThisItem.Title));
Patch(SHAREPOINT_DB, currentRecord, {TotalClicks: currentRecord.TotalClicks + 1});
Navigate(DetailScreen1, ScreenTransition.UnCover)



 And the gallery Items are populated via:




Filter((SortByColumns(Search(SHAREPOINT_DB, TextSearchBox1.Text, "ANSWER", "CATEGORY","TOPIC","HOWID","LINK"), "CATEGORY", If(SortDescending1, Descending, Ascending),"TOPIC", Ascending)),!IsBlank(TOPIC),CATEGORY in ComboBox2.SelectedItems)



However, when I am in the "Top 10 Entries" list, clicking any of the gallery Items brings me to the very first Item in my 'SHAREPOINT_DB' instead of selecting the correct entry. The Items in this "Top 10" list are populated via:




FirstN((SortByColumns(colNumberedSHAREPOINT_DB, "TotalClicks", Descending)),10)



However the OnSelect for each item in this "Top 10" BrowseGallery is the same code as above for the main BrowseGallery.


Any suggestions or solutions to why the navigation inside my "Top 10" list only navigates to the first entry in the list instead of setting the correct record and navigating accordingly?


Thank you in advance!

Super User II
Super User II

Hi @jchris207 

Just a guess but I think the problem may be in your Set() function



     currentRecord, LookUp(
                           SHAREPOINT_DB, ID = ThisItem.ID



Helpful resources

PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!


Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (19,180)