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
Answered

Search Bar Gallery

(0) ShareShare
ReportReport
Posted on by 112

Hi,

 

Trying to do a few things with Power Apps to help update assets via a SharePoint List. One thing at a time....

 

When I try searching the asset numbers in the search bar, I can't find anything. I assumed the "Title" just needed to be replaced by "Asset Numbers" column name on SharePoint. Tried that and nothing.

SortByColumns(Filter([@'Asset Manager'], StartsWith(Title, TextSearchBox1.Text)), "Title", If(SortDescending1, SortOrder.Descending, SortOrder.Ascending))

mvaladez_0-1715890285777.png

 

Categories:
  • Verified answer
    Gochix Profile Picture
    1,937 Moderator on at

    @mvaladez ,

     

    Your assumptions are wrong I'm afraid.

    You have to change the StartsWith function instead of SortByColumns function.

    SortByColumns(Filter([@'Asset Manager'], StartsWith('Asset Numbers', TextSearchBox1.Text)), "Title", If(SortDescending1, SortOrder.Descending, SortOrder.Ascending))

    The "Title" will only be used to Sort the filtered results by Title, you can change this to "Asset Numbers" if you wish to sort the gallery by Asset Numbers.
    _____________________________________________________________________________________
    Please give a thumbs up if I resolved your issue! Please click Accept as Solution to close the topic!

  • Ami K Profile Picture
    15,689 Super User 2024 Season 1 on at

    @mvaladez - could you try the below:

     

    SortByColumns(
     Filter(
     'Asset Manager',
     Len(TextSearchBox1.Text) = 0 || StartsWith(
     Title,
     TextSearchBox1.Text
     )
     ),
     "Title",
     If(
     SortDescending1,
     SortOrder.Descending,
     SortOrder.Ascending
     )
    )
  • Ami K Profile Picture
    15,689 Super User 2024 Season 1 on at

    @mvaladez - ignore me. I misread your post

  • mvaladez Profile Picture
    112 on at

    The gallery gave me an error that the StartsWith has invalid arguments. Changed the "Title" to "Asset Numbers" and get another error "The SortByColumns part of this formula might not work correctly on large data sets."

    SortByColumns(Filter([@'Asset Manager'], StartsWith('Asset Numbers', TextSearchBox1.Text)), "Asset Numbers", If(SortDescending1, SortOrder.Descending, SortOrder.Ascending))

     

  • Gochix Profile Picture
    1,937 Moderator on at

    @mvaladez ,

     

    Check for typos if an invalid argument error is displayed.
    The SortByColumns part of this formula might not work correctly on large data sets. - that's due to delegation. It's just a warning, not error.
    _____________________________________________________________________________________
    Please give a thumbs up if I resolved your issue! Please click Accept as Solution to close the topic!

  • mvaladez Profile Picture
    112 on at

    I copied and pasted the formula and it worked now, so there must've been a typo. Thank you!

    It shows the delegation warning still. There are only 50 assets at the moment. Is there something else I could use if the list was to get bigger?

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 221 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 188 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 120

Last 30 days Overall leaderboard