Perspective URL Dictionary Parameter

So, I did more testing, and realized that how I was using a question mark was with its escape value %3F and not the actual ? and so the URL isnt able to detect anything after the ?.

What i think is happening here is that the web server is trying to count anything after the ? as a url parameter in a different way than Perspective is setup to take, and so its ignoring anything after it. I created a support ticket about it, because it kind of feels like a bug, but it also could be an unfortunate limitation of the way Perspective takes its URL parameters vs the way traditional web pages take parameters.

I would be curious to see @cmallonee knows anything about this, and if there is some special escape character you could append at the end of your callback url that would tell perspective to ignore the following character. Similar to putting a \ in a string to treat the following character as its string value rather than its functional value.

1 Like

A bit of an update as I learned some more

The reason that your parameter is failing, and you cant ignore the ? is because the browser thinks that you are trying to provide a query parameter to the web page. You can learn about query parameters vs path parameters here.

Currently Perspective does not support the use of query parameters, however @Carl.Gould did say in the ICC discord the other day that this is something that development is looking into.

Without knowing if its possible to tell ignitions webserver to “ignore” query parameters, I would say that your current solution with the redirect page is probably the way you have to go.

I’m guessing passing parameters with ? is still not supported yet?

We added it in 8.1.13, but please remember that any params passed within a url will always be interpreted as string values.

1 Like

How nice!
Should this then be working?

system.perspective.navigate(
	page = "/view?key=8"
)

Or is there an instruction on how to use it with the navigate function? It did not work for me.

PAGE navigation does not support URL parameters. You need to perform URL navigation to make use of them. If you’re using PAGE navigation, you need to use the configured params from the Page Configuration for that page.

Page navigation:

system.perspective.navigate(page = "/view/8")

URL navigation:

system.perspective.navigate(url="http://<GatewayIP>:<port>/data/perspective/client/<projectName>/view?key=8")

There is no documentation for URL parameter usage because it’s not an Ignition paradigm, but I understand why you’re asking. I’ll speak with the documentation team to see if we can add a bit about how to use the scheme in conjunction with Ignition parameters.

1 Like

I see, thanks! It would also be really good if it’s added to page navigation.

Any updates on this? We'd like to see page navigation working with URL parameters.

1 Like

Any updates on this? We'd like to see page navigation working with URL parameters. It would be super helpful for us!

The forums are not an official avenue for requesting features, and are not regularly parsed by I.A. employees - hence my never replying to your request for more info 18 months ago. If this is really a feature you would care to see, the ideas portal is where you should request it and campaign for upvotes.

4 Likes