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 / Remembering recent sea...
Power Apps
Answered

Remembering recent searches in PowerApp search box

(0) ShareShare
ReportReport
Posted on by 10

I have a gallery on a form that pulls in data connected to an Oracle database. There are thousands of rows in this data set which contain info related to individual project numbers. 

 

On the main form I have the Project Number and Project Name listed. I have a search box at the top that allows people to type in project numbers to find the exact one they are looking for. Once a number is selected this takes them to another detail form. 

 

I was wondering if anyone knows if the capability exists for the search box to remember a user's past searches? So if they click in the search box, a list of recent project number searches will appear or they can type in a new one.

 

Thanks. 

Categories:
  • StalinPonnusamy Profile Picture
    Super User 2024 Season 1 on at

    Hi @Carmour 

     

    We don't have this feature to keep the search history by default. Workaround to another table or some kind of data source to store all search keys/items.

     

    • Have a combo box (List existing, Search, and Manuel entry)
    • Set the items property to Sort(TableQueries.SearchItem,SearchItem)
    • OnChange of the combo box, need to check the data source whether the search item exists or not. If not exist then insert a new row.
    • And then navigate to form if the project exists.


    Thanks,
    Stalin - Learn To Illuminate

  • Carmour Profile Picture
    10 on at

    Thanks for the info. 

    I just have a list box and a data source with all the project numbers. 

    I don't think this would be a viable solution for what I'm trying to do, as I'm having users search a test box for the data in the data connection.  A combo box is not a viable option for me. 

  • StalinPonnusamy Profile Picture
    Super User 2024 Season 1 on at

    Hi @Carmour 

     

    From your description, you have text control for the search and List box to display the project. In that case

     

    Set the Default property of List control to 

    ProjectSearch.Text

     

    StalinPonnusamy_0-1643651344379.png

     

  • Carmour Profile Picture
    10 on at

    The list is a pre-defined BrowseGallery that pulls from a database.  (See below)

     

    There are two items in play here: the TextSearchBox and the BrowseGallery that pulls in the data. 

     

    Is there an option for the search box to remember what projects a user previously searched for? So they type in 9011999 one time and then come back to the screen and begin to type 90... and the number is available in the search box for them to see.

     

    Carmour_0-1643659867407.png

     

  • Verified answer
    StalinPonnusamy Profile Picture
    Super User 2024 Season 1 on at

    No option to keep the searched item in the cache for now.

  • Carmour Profile Picture
    10 on at

    Thanks. Maybe someday in the future!

  • CU31070845-0 Profile Picture
    on at

    I can provide an inconvenient but working solution. Just set some variables with an And() and the ComboBox' items to a table of those variables when the search is triggered. Be careful in ordering the initialization of variables. It is important to "save" older search terms before overwriting the last variable.

     

    Example for remembering last 3 search terms:

     

    varSearch* are variables

    inp_SearchText is a text input control

     

    Trigger's (Icon, Button, etc.) OnSelect:

    And(

    Set(varSearch3, varSearch2),
    Set(varSearch2, varSearch1),
    Set(varSearch1, inp_SearchText.Text)

    )

     

    ComboBox' Items (formatted as Table):

    [varSearch1, varSearch2, varSearch3]

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

#2
Mohsin Ali Profile Picture

Mohsin Ali 323

#3
WarrenBelz Profile Picture

WarrenBelz 193 Most Valuable Professional

Last 30 days Overall leaderboard