Query param passed using utils.openPage doesn't trigger search input default

Hello,
I'm totally new to Retool and hoping this is a quick fix I'm just not seeing and even pointing me to the right documentation would be immensely helpful.

I have a multipage App with a sidebar layout to switch between pages. When I click a button in a table row on one page, I have it setup to grab the serial number from the table row and open up the page with the serial appended using this:
action: go to page
page: BOM
query params:
project_serial
value: {{ currentSourceRow.serial }}

That works great, the URL has "?project_serial=70171" appended. My problem is getting the serial number into the text input from the URL after clicking that button from the previous page.

On the bom page, I have a text input with default value:
{{ urlparams.project_serial || '' }}

If it manually type in the serial, my table populates (it's hidden until anything is typed) properly.

If I manually refresh the BOM page, everything works as it pulls the serial from the URL. I know it's because the entire page isn't reloaded when I click from the previous page, but I don't know how to get it to go.

I’ve tried setting “Run query on page load,” default values, and event handlers, but none of them seem to trigger on navigation since the page doesn’t fully reload).

What’s the best way to detect when the BOM page becomes visible to have the the search input get the serial and populate the table?

Thanks in advance

Hello @JustinB, welcome to the Retool Community!

You can implement this functionality using a row action on your table. Set the event handler as follows:

  • Action: Go to page
  • Page: Your target/redirection page
  • Pass data with: Parameters
  • Query Params:
    serial-number{{ currentSourceRow.serialNumber }}

:pushpin: Reference – Page 1 (Row Action Setup):

Then, on the second page, use a Text Input component and set its Default Value to:
{{ url.searchParams.serialNumber }}

:pushpin: Reference – Page 2 (Default Value Setup):

Thanks for the assistance!
I believe I did as you recommended, having to change parameters a bit to match my own, but the row action still doesn't refresh the page, even though the is URL is being properly appended with the row action. I still have to refresh the whole page in browser to get it to populate.