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 / Search Item problems
Power Apps
Answered

Search Item problems

(0) ShareShare
ReportReport
Posted on by 65

Hi, I have created an app for our mobile phones. I do have a couple of issues with it. the first one I need to get working is the 'Search' box. If I type in a name for example the window just goes blank. It is clearly missing something, possibly a formula, but being relatively new to this, it is proving to be a mind boggler. I have attached some pics below with what I have on screen both from my laptop and the mobile app itself.

Search Bar showing AdvancedSearch Bar showing AdvancedSearchIcon1 showing advancedSearchIcon1 showing advancedshowing auditor name and initiatorshowing auditor name and initiatorshowing blank when a name entered in search boxshowing blank when a name entered in search box

Categories:
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hey,

     

    if you want to use your search box you have to write formula for the gallery, for items field on the gallery control, that it should be filtered by the search box.

     

    E.i. : Search(Datasource, TextSearchBox1_1.Text ,field_on_datasource) or Filter(datasource, TextSearchBox1_1.Text in field_on_datasource)

     

    Note: field_on_datasource is the field in which should be the value in searchbox searched.

     

    Hope this helps.

  • PavanKumar Profile Picture
    479 on at

    Hi,

     

    You can do the following to resolve the issue.

     

    1. Bind a collection to the gallery (e.g colAuditRegistry)

    2. Onvisible of the screen use the formulae to get values for collection and collect it in a collection.

    ClearCollect(colAuditRegistry,Datasource)

    Note: If you want to show particular data from the datasource you can filter that here as well.

    3. onSelect of Search Icon write another formulae which searches with the textbox value.

    ClearCollect(colAuditRegistry, Search(Datasource, TextSearchBox1_1.Text ,field_on_datasource) );

    Note: Replace the textbox field name and fieldondatasource with which field you want to search.

     

     

    Feel free to let me know if you have any further questions.

     

    If this answers your question mark it as verified and give thumbs up

    Regards,

    Pavan Kumar Garlapati

  • Verified answer
    DebsWadge Profile Picture
    65 on at

    Hi

     

    In the BrowseGallery1, in advanced there is a formula as follows:

     

    SortByColumns(Filter('JMS Audit Register', StartsWith(Title, TextSearchBox1.Text)), "Title", If(SortDescending1, Descending, Ascending))

     

    The formula in there was generated by PowerApps when I created the app.

    It's all a bit confusing to me, to be honest.  The app is not showing an error, however, it is saying there is an issue,

    'Invalid argument type (Record). Expecting a Text value instead'. In the formula the word "Title" is in red. I am not sure if that is where the problem lies. The rest of the formula is in blue, green, black and plum as shown above.

     

    Capture.JPG
  • PavanKumar Profile Picture
    479 on at

    Hi,

     

    Don't worry about Red color Title, its just to show which column are you using in the list to search.

     

    Use the same formulae onselect of search icon and see when you search for a record and click on search icon its returning the values in gallery.

     

    If this answers your question mark it as verified and give a thumbsup

    Regards,

    Pavan Kumar Garlapati

  • v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @DebsWadge ,

    Is the "Wadge" search word existed in the Title column in your SP List?

    Does the SearchBox in your app work within your browser? Or same issue as that in your mobile device?

     

    Based on the formula and screenshot that you provided, I could not find any syntax issue with it. If the "Wadge" search word is not existed within the Title column of your SP List, please consider modify your formula as below:

     

    SortByColumns(
    Filter('JMS Audit Register', StartsWith(Title, TextSearchBox1.Text)),
    "Title", If(SortDescending1, Descending, Ascending),
    "SearchColumn", If(SortDescending1, Descending, Ascending)
    )

    Note: The SearchColumn represents the Text column in your SP list, which used to store the "Wadge" search word.

     

    Also please consider turn off the "Improved app rendering (final validation)" option wtihin Advanced settings of App settings of your app, then re-publish your app, run your app in mobile device again, check if the issue is solved.

     

    Best regards,

     

  • DebsWadge Profile Picture
    65 on at

    I think I have more or less solved the problem I was having. by changing the format of the field, so it now works to search and sort. I still have 1 little problem with the search. the search is based on the Auditor field. At the moment there are only 2 people who have entered into it as it is still a job in process. If I want to search on say Paul Jones for example. If I start typing in P it will put names up beginning with P, in this case there is only 1 entry. However, if for example, I type in 'ul' the page goes blank. It should pick up any of the names in that field that have whatever letters I type in. I would only expect a blank page if it couldn't find any. e.g. If I typed in a 'Y' then it would be blank as there are no names with a 'Y' in it. I've watched various UTube videos and have followed them, however, I can't seem to get around this 1 little problem. It is most likely, something really tiny, but I can't figure it out. the formula is below and I have attached 2 pics to show what I mean.

    SortByColumns(Filter('JMS Audit Register', StartsWith(Auditor, SearchBox1.Text)),"Auditor", If(SortDescending1, Descending, Ascending))

    Capture2.JPG
    Capture.JPG
  • Verified answer
    Luke_Timmins Profile Picture
    176 on at
    Hi DebsWadge

    I would recommend reading the ms documentation on PowerApp functions.

    The function you want to use is search.

    SortByColumns(Search('JMS Audit Register',SearchBox1.Text,"COLUMNNAMHERE"),"Auditor", If(SortDescending1, Descending, Ascending))

    You can also search more than one column if needed by adding additional parameters to the search function I.e.

    SortByColumns(Search('JMS Audit Register',SearchBox1.Text,"COLUMNNAMHERE","COLUMNNAMEHERE"),"Auditor", If(SortDescending1, Descending, Ascending))

    Hope this helps.
    Luke

    https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-filter-lookup
  • DebsWadge Profile Picture
    65 on at

    Hi Luke, That is perfect. I can see now where the problem was and it was something small but made a real irritating problem. Thank you all for your help and advice, it is very much appreciated.

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

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 395 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 260 Most Valuable Professional

Last 30 days Overall leaderboard