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 / How to Display Initial...
Power Apps
Answered

How to Display Initial Default List

(0) ShareShare
ReportReport
Posted on by 178

This is my once a year deep dive into Powerapps and I have another problem.

 

My app works fine, but I want the user to get the initial list of items before they have to search in case they want to scroll.

 

Here is my screen:

 

KProuty_0-1661987780056.png

 

Nothing is showing up in the gallery because they haven't searched yet.

 

I found where it says what to put in items, but I want the search function in items with the variable.

 

KProuty_1-1661987878939.png

 

It is probably very obvious but I'm stuck. I just want the list to display in alphabetical order when they open the app. It won't be a very long list so there is no way it would hit 500.

 

Any help appreciated.

 

Categories:
I have the same question (0)
  • Pstork1 Profile Picture
    69,228 Most Valuable Professional on at

    The easiest way is to add an IF() around the outside of your current function that checks to see if searchQuery isBlank().  If it is just do the sort on the full data source.  If its not then do the current function.

  • KProuty Profile Picture
    178 on at

    Thanks, Paul, I'm getting the concept (thanks to you) but I'm having trouble with the syntax to make it work.

  • Pstork1 Profile Picture
    69,228 Most Valuable Professional on at

    Paste your current filter into a reply and I'll show you what I mean.  I can't copy it from the screenshot.

  • KProuty Profile Picture
    178 on at

    SortByColumns(Filter(Policies, searchQuery in Title), "Title", If(SortDescending1, Descending, Ascending))

  • Verified answer
    Pstork1 Profile Picture
    69,228 Most Valuable Professional on at

    It should be something very close to the following:

    if(isBlank(searchQuery),
     SortByColumns(Policies, "Title", If(SortDescending1, Descending, Ascending)),
     SortByColumns(Filter(Policies, searchQuery in Title), "Title", If(SortDescending1, Descending, Ascending)))

     

  • KProuty Profile Picture
    178 on at

    By George, I think you've got it! Thank you! Just had to make some case changes, etc.

     

    If(IsBlank(searchQuery),SortByColumns(Policies, "Title", If(SortDescending1, Descending, Ascending)),SortByColumns(Filter(Policies, searchQuery in Title), "Title", If(SortDescending1, Descending, Ascending)))

     

    Thank YOU!

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 551

#2
WarrenBelz Profile Picture

WarrenBelz 430 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 298

Last 30 days Overall leaderboard