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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Gallery Items do not s...
Power Apps
Unanswered

Gallery Items do not show up until something is typed in text search box

(0) ShareShare
ReportReport
Posted on by

When I log into my app, the gallery is blank.  After typing something in the search box, the items appear and will stay visible even if I delete the text from the search box.  In the 'Items' section of my gallery, I have:    Search(SortByColumns(Entity, "Username", If(SortDescending1, Descending, Ascending)),TextSearchBox1.Text, "Username")

The gallery will display correctly if I only put 'Entity' in the Items section, but then the search box would have no functionality.  How do I make the gallery display automatically when I log into the app while still keeping functionality for my search box?

 

 

Thanks in advance!

Categories:
I have the same question (0)
  • nickduxfield Profile Picture
    497 on at

    You could possible use an If statement to get you going, then you can use other more complex methods later.

    Think of your default filter for the gallery without the textinput, then setup an if IsBlank.

    If(IsBlank(TextInput.Text),SortByColumns(Search(Entity, TextSearchBox1.Text, "Username"),"Column", If(SortDescending1, Descending, Ascending)),SortByColumns(Search(Entity, TextSearchBox1.Text, "Username"),"Column", If(SortDescending1, Descending, Ascending)))
  • Community Power Platform Member Profile Picture
    on at

    Hi @nickduxfield,

     

    I tried out your suggestion but am still having the same issue of not being able to see gallery items until after I type something into the search box.

    Gallery issue.PNG

  • Verified answer
    nickduxfield Profile Picture
    497 on at

    Thanks,

    Reference:https://powerapps.microsoft.com/en-us/tutorials/function-filter-lookup/

    Hey please keep in mind the concept is the IF statement, we still need to get the details right for everything else.

    Also, we can try different syntax found in the above.

     

    Some observations from the code below:

    1. You can't include the searchinput.text on the first if statemement because we want this to be the default criteria if the textinput is empty. To give this a proper default filter withou input from the TextInput control you may need to change the Search() function to possibly a Filter() function and settle on what a default filter looks llike. Example below.
      1. If(IsBlank(TextInput.Text),SortByColumns(Filter(Entity, Column=true,Column=false),"Column", If(SortDescending1, Descending, Ascending)),SortByColumns(Search(Entity, TextSearchBox1.Text, "Username"),"Column", If(SortDescending1, Descending, Ascending)))

    I trust you understand the concept, 

    If textinput is empty, ignore textinput and Fliter like this. If it is populated, Search using the textinput like this.

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard