How to override query parameter from url?

Hi, I am wondering if this is possible.
I have a page with a server connect which loads ads based on a sessionManager variable.
Is it possible to override this variable with a parameter in the url?

So if I use http://myurlpage?environment_id=100
to have that override the session environment_id of say 4

What is the condition here - If the environment_id equals 100 then set it to 4?
Or the logic is different?

If I understand you correctly, you could use default()

Like:
query_manager.data.environment_id.default(session_manager.data.environment_id)

So this way it will show the query parameter environment_id when it’s available, and if there is no query parameter it will default to the session manager environment_id.

@Teodor
The idea is that when there is no query url, it reverts back to the session variable.
Looking at the post from @htatd I think that is what I am looking for.

1 Like

Okay, it seems like it is not exactly woking (yet)
The query is doing the request to the server, but this bypasses the server connect action?
Thus resulting the listviews on the page lot loading because they rely on the server connect

So when you rely on the session variable, the parameter is empty like this: “myurlpage?environment_id=”?

Because in that case it doesn’t default to the session manager, it will default to it when there is no query parameter

I don’t have a query in the url ‘normally’ because the server connect takes care of getting the data.
Now that I am thinking of it, the query string doesn’t know which api to cal… hmm