web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Gallery items don't di...
Power Apps
Unanswered

Gallery items don't display right away, how can I improve this search formula on a large dataset?

(0) ShareShare
ReportReport
Posted on by 310

My canvas app is connected to a SharePoint list that contains more than 2000 items.  The search filters on my page work without delegation issue, however it doesn't behave intuitively to users.  When they land on the page and change a filter, it doesn't list any items in the gallery until they enter a value/delete a value in the first search field.  I struggled with this search function because of delegation issues, I was happy to get it finally working but it's an irritant to users.  Any advice would be greatly appreciated.  

 

Here's the page when you first land on it.  If you add a filter to the Area or Lead combo box, the gallery items don't display.  You need to enter a value in the Search box, then delete it for the gallery to display any items matching the criteria.   

allan_t_0-1706116312778.png

Applied a filter, no gallery item displays.  

allan_t_1-1706116418379.png

I typed a 1, then deleted it in the Search text box, then 256 items displayed matching the filter.  

allan_t_2-1706116494591.png

Here's the items property formula for this gallery another community member helped me with.  

The search text box is called inpSearchNameID, it looks up a text value in SharePoint list.

The status combo box is called cmb_Status_1, it looks up a text value in SharePoint list. 

The Lead combo box is called cmbLeadAssigned_1, looks up a person column in SharePoint list, permits multiple people.

The Area combo box is called cmbServiceArea_1, looks up a choice column in SharePoint list, permits multiple choices. 

 

Items formula: 

SortByColumns(
With(
{
_data: Filter(
WorkRequest,
AppLoad = true,
(StartsWith(
RequestShortName,
inpSearchNameID.Text
) || SearchableID = inpSearchNameID.Text),
Len(cmbStatus_1.Selected.Value) = 0 || StartsWith(
Open_Closed_Text,
cmbStatus_1.Selected.Value
)
)
},
Filter(
_data,
Len(cmbLeadAssigned_1.Selected.Value) = 0 || cmbLeadAssigned_1.Selected.Value exactin Concat(
LeadAssigned,
ThisRecord.Email & ","
),
Len(cmbServiceArea_1.Selected.Value) = 0 || cmbServiceArea_1.Selected.Value exactin Concat(
ServiceAreas,
ThisRecord.Value & ","
)
)
),
"Modified",
SortOrder.Descending
)

 

Categories:
I have the same question (0)
  • jrletner Profile Picture
    720 Moderator on at

    It appears that the issue may be in the "with" function. The temporary table "_data" is not available until the search box has a value entered into it. So, the following Filter function doesn't have a table to work with.

    • With: This function creates a temporary table that can be used in other functions. In this case, it creates a table called _data that is the result of filtering the WorkRequest table.

    If this WITH does not happen, then the _data table is not available to use in a Filter.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 429 Most Valuable Professional

#2
11manish Profile Picture

11manish 191 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 122 Super User 2026 Season 2

Last 30 days Overall leaderboard