Retargeting in Perspective

Is there a way to retarget to other projects in Perspective like there is in Vision? I’ve tried the system.perspective.navigate command, but that doesn’t work too well using the Perpective app. If you try it in the app, it launches the new project in a browser instead of within the app.

In speaking with our head of mobile development, it sounds ike using system.perspective.navigate(url=self.session.props.gateway.address + '/data/perspective/client/projectName/path/page') should keep you within the application (it worked for him). If you’re targeting a DIFFERENT Gateway, then no - there is no way to do that currently. Could you supply the code you’re using to perform the navigation?

Edit: PGriffith keeping me honest.

The projects are on the same gateway. Project name is “Minto” and the homepage is called “Home”.

The gateway address session prop is http://localhost:8088.

Here is the script that I am using. It still tries to launch the new project in a browser.
system.perspective.navigate(url=self.session.props.gateway.address + ‘/Minto/Home’)

The curly braces are a syntax error, and definitely wouldn’t work.
I think the URL is still malformed even without them, though - I suspect you need something like:
system.perspective.navigate(url="{address}/data/perspective/client/{project}/{path}".format(address=self.session.props.gateway.address, project="Minto", path="Home")

2 Likes

Thanks for the help and especially the quick responses! Here is what I ended up with that works.

str = “{}/data/perspective/client/{}/{}”.format(self.session.props.gateway.address, “Minto”, “Home”)
system.perspective.navigate(url=str)

2 Likes