Dynamic Linking Through A Route With a Variable

Hi guys,
Need a little help on an SPA project.

I've got this new route setup, that connects to an old page:

On the page where they can click on the expense to record:

When the user selects the edit button it routes properly to this page.
And it should "load" the expense listed in the query.

But, nothing is being loaded.

Here's the server connect:

And the response on the webpage:

:thinking: What am I doing wrong?

And, yes, I've gone over and over this page:
https://docs.wappler.io/t/url-rewriting-with-wappler/6254

I am having the same issue

1 Like

Hello!

Don't know if it's related but:
That query.code doesn't look right, seems it's not defined as a variable..
Instead, is setted as "query.code"

1 Like

You also need to select the Routing icon (furthest right icon next to the url) which will allow you to select the parameter value and not use Dynamic Picker for the value.

This is the icon to click for routing purposes:
image

1 Like

Okay, I got this figured out.

@franse was correct that there was something wrong with:
image

There were double quotes and single quotes in there, so it looked like:
"'query.code'" instead of "query.code"

But, also, and this was the real kicker... it needed to be:
"params.code" and not "query.code" when accessing it!

Thanks!!

P.S. @Teodor, I might suggest that the official documents (referenced in original post) make it a little clearer that you have to reference it with the params instead of the query.

3 Likes