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 / Implementing a search ...
Power Apps
Answered

Implementing a search function for forms

(0) ShareShare
ReportReport
Posted on by 8

Hi everyone!

I have built an app that looks like this: there is a gallery that contains elements of an MS Lists from SharePoint. Next to it there is a form that displays the entries with their details.
I would now like to create a search function that searches both the gallery and the form. The search results should therefore contain attributes of the entries in the gallery and the form.
What should such a function look like?

 

Explanation: on the left site there is the gallery which contains the attributes "Title", "Details" and "Year". On the right side there is the form which also contains these attributes plus the attribute "Content".

App.PNG
Categories:
  • Ami K Profile Picture
    15,689 Super User 2024 Season 1 on at

    @Anonym12 - it is not possible to run a Search function on an Edit Form control. Given the data source of the Form shares the same data source used in the Gallery, what is the purpose of trying to run a search on the fields of a Form?

  • Anonym12 Profile Picture
    8 on at

    Hi Ami,
    Thank you very much for your reply.
    I wasn't aware that the "content" is also stored in the gallery. The search function may be limited to the gallery, but the "content" must also be taken into account.

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

    @Anonym12 -

     

    Sorry I do not understand what you by mean by "content". 

     

    An Edit Form control will display the details of a record that you specify. Typically, we populate the record with a Gallery control selection.

     

    Further reading:

     

    https://learn.microsoft.com/en-us/power-apps/maker/canvas-apps/controls/control-form-detail 

  • Anonym12 Profile Picture
    8 on at

    Sorry, I was a bit imprecise.

    The "Content" field is a column in my Microsoft List. In the end, my point is that I can use the search function in the gallery to search all columns of my Microsoft List from the sharepoint, regardless of whether they are displayed in the entries or not. So it's just about a search function that allows me to search all entries of the data set in the app and only display the results that contain exactly the search terms. Can you work with this?
    Unfortunately, the articles from Microsoft didn't help me.

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

    @Anonym12 -

     

    If you simply want to display the content of your data source, insert a Gallery control into your app and set the Items property to your data source.

     

    If you want to Filter the Gallery contents by a specific search string, you can use the Search or StartsWith function in the Items property.

     

    E.g.

     

    Search:

     

    Search(
     'Your Data Source',
     TextInput1.Text,
     "Column1",
     "Column2",
     "Column3"
    )

     

    StartsWith:

    Filter(
     'Your Data Source',
     Len(TextInput1.Text) = 0 || StartsWith(
     Column1,
     TextInput1.Text
     )
    )

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 352 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 323

#3
Mohsin Ali Profile Picture

Mohsin Ali 226

Last 30 days Overall leaderboard