# Collection Filter Search and URL Parameters

**URL:** <https://community.weweb.io/t/collection-filter-search-and-url-parameters/2345>\
**Category:** How do I?\
**Tags:** design\
**Created:** [April 18, 2023, 7:48pm UTC](https://community.weweb.io/t/collection-filter-search-and-url-parameters/2345 "2023-04-18T19:48:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![InterviewKey](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/interviewkey/32/4631_2.png) [@InterviewKey](https://community.weweb.io/u/InterviewKey)\
**Post date:** [April 18, 2023, 7:48pm UTC](https://community.weweb.io/t/collection-filter-search-and-url-parameters/2345/1 "2023-04-18T19:48:16Z")

</div>

I am currently using an input field as a search bar for a table. When I type into the search bar, it filters a collection.

I would like to make it so whatever is searched in the field gets added as a parameter in the URL. That way if an item is clicked on, and then the user clicks on back it will take them to the already searched table.

How can I achieve this?

---

<div class="post-metadata">

**Author:** ![Quentin](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/quentin/32/6_2.png) [@Quentin](https://community.weweb.io/u/Quentin)\
**Post date:** [April 19, 2023, 9:15am UTC](https://community.weweb.io/t/collection-filter-search-and-url-parameters/2345/2 "2023-04-19T09:15:57Z")

</div>

Hey @InterviewKey 👋

You can use a query variable to do just this. And in your search bar workflow, set this variable to the value the user searched.

When going back to the previous page, you can set the initial value of the search bar back to the value of this query variable, to set back the search.

Here’s a doc on query variables: [Booleans | Weweb documentation](https://docs.weweb.io/variables-data-types/intro-to-variables.html#query)
