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 / Not sure where to plac...
Power Apps
Answered

Not sure where to place search function

(0) ShareShare
ReportReport
Posted on by 77

My current formula for my Gallery Items property is:

If(isAdmin,Sort(AllTickets,Created,Descending),Sort(Filter(AllTickets,Author.Email=MyProfile.Mail||Author.Claims=MyProfile.UserPrincipalName),Created,Descending))

 

I would like to add search functionality to filter all tickets:

 

Search(AllTickets, SearchBox.Text, "Title", "AssignedTo","Priority","TaskStatus")

 

However I am not sure where to put this at to allow both displaying all tickets and letting me search the gallery.

 

Any suggestions?

Categories:
I have the same question (0)
  • Verified answer
    PowerAddict Profile Picture
    7,316 Most Valuable Professional on at
    Hi,

    You have combined Sort and Filter correctly. You just need to replace AllTickets within your Filter by the search expression and also in the first sort function.

    Something like this:

    If(isAdmin,Sort(Search(AllTickets, SearchBox.Text, "Title", "AssignedTo","Priority","TaskStatus"),Created,Descending),Sort(Filter(Search(AllTickets, SearchBox.Text, "Title", "AssignedTo","Priority","TaskStatus"),Author.Email=MyProfile.Mail||Author.Claims=MyProfile.UserPrincipalName),Created,Descending))

    Let me if this doesn't work.

    ---
    If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution. Thanks!

    Hardit(Haman)
  • tonysommer Profile Picture
    77 on at

    it is saying the Search function has some invalid arguments.

  • tonysommer Profile Picture
    77 on at

    Apologies it does work. When it is the following:

    If(isAdmin,Sort(Search(AllTickets, SearchBox.Text, "Title"),Created,Descending),Sort(Filter(Search(AllTickets, SearchBox.Text, "Title"),Author.Email=MyProfile.Mail||Author.Claims=MyProfile.UserPrincipalName),Created,Descending))

     

    However whenever I add anything other than "Title" it states that there are some invalid arguments.

  • PowerAddict Profile Picture
    7,316 Most Valuable Professional on at
    So you can only use text fields for searching. I believe Title is a text field. If you were trying to search by any other field that's not text, it will throw an error.

    ---
    If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution. Thanks!

    Hardit(Haman)
  • tonysommer Profile Picture
    77 on at

    No other way around this to search choice fields or drop-downs or anything?

  • PowerAddict Profile Picture
    7,316 Most Valuable Professional on at
    Nothing that's available out of the box using Search function. However you can use filter function to get a list of the desired results. Will that work?

    ---
    If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution. Thanks!

    Hardit(Haman)
  • Verified answer
    v-monli-msft Profile Picture
    Microsoft Employee on at

    Hi @PowerAddict ,

     

    So far it is not possible to use the Search function for column types other than strings. 

     

    There is a workaround which is using a collection created with your SharePoint list, then use the AddColumns function to run a calculation on the non-text field and turning it into a new field that was a text item. Then use Search on the newly created field.

     

    AddColumns(myTable, "newColumn", PlainText(oldColumn.Value))

     

    Regards,

    Mona

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 541

#2
WarrenBelz Profile Picture

WarrenBelz 434 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 289

Last 30 days Overall leaderboard