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 Apps
Unanswered

Gallery is blank

(0) ShareShare
ReportReport
Posted on by 576

I have tried to create an app from a datasource (SP list). However, app doesn't show any records in the gallery.  The formula in the gallery items property is SortByColumns(Filter([@'Project Initiation'], StartsWith(Title, TextSearchBox1.Text)), "Title", If(SortDescending1, Descending, Ascending)) .  However, when the search field is blank, the gallery doesn't return any items. Thoughts?

Categories:
I have the same question (0)
  • mdevaney Profile Picture
    29,991 Moderator on at

    @ahhollan 

    When the text input ISBLANK a condition of True will show all records.  Make this small change to your code.  

     

     

     

    SortByColumns(
     Filter(
     [@'Project Initiation'],
     If(IsBlank(TextSearchBox1.Text),True,StartsWith(Title, TextSearchBox1.Text))
     ),
     "Title",
     If(SortDescending1, Descending, Ascending)
    )

     

     

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • DisappointmentB Profile Picture
    61 on at

    Hello,

     

    The formula is expecting a result to be in the search box. You can check to see if the search text is blank. If it is then simply return all the results and if not use the formula you have.

     

    Regards

     

    Ben

  • ahhollan Profile Picture
    576 on at

    I made the change and still get errors.

     

    11-14-2019 10-09-18 AM.png

     

     

     
  • DisappointmentB Profile Picture
    61 on at

    Hi,

     

    I would separate the formula out so that it is easier to read and see the errors. So:

     

    If(IsBlank(TextInput1.Text),

    SortByColumns([@'Project Initiation'],"Title", If(SortDescending1, Descending, Ascending)) ,

    SortByColumns(Filter([@'Project Initiation'], StartsWith(Title, TextSearchBox1.Text)), "Title", If(SortDescending1, Descending, Ascending)))

     

     

  • mdevaney Profile Picture
    29,991 Moderator on at

    @ahhollan 

    It would be helpful to know what error messages you are receiving.

  • ahhollan Profile Picture
    576 on at

    11-14-2019 10-48-45 AM.png

     

    That helped, but now I get...

     

     
     
  • DisappointmentB Profile Picture
    61 on at

    Hello,

     

    Someone with the same problem of the Lookups asked here and a solution has been given. Would be worth checking if you have the same situation.

     

    https://powerusers.microsoft.com/t5/Building-Power-Apps-Formerly/Error-The-query-cannot-be-completed-because-the-number-of-lookup/td-p/144130

  • mdevaney Profile Picture
    29,991 Moderator on at

    @DisappointmentB 

    Agreed this is a SharePoint issue.

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 June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 352 Most Valuable Professional

#2
11manish Profile Picture

11manish 192

#3
Valantis Profile Picture

Valantis 128

Last 30 days Overall leaderboard