Pass parameters to a Perspective session in Vision, either by opening the view in a browser - or passing them on in the Web browser module

I have a project that is mainly based on Vision, and need to build a solution where the operator can upload images or files for their daily reports. Perspective supports this, but then I will need to pass on parameters as username, object name and description to the Perspective session.

I guess browser or web browser module both depend on the URL, and the URL only. Is it possible to somehow pass on parameters in the URL?

Like http://url:8088/data/perspective/client/project/view?parameterA=1234

Solution:

Or just use Vision’s system.util.sendRequest() function to send whatever you want to the gateway, perhaps?

(You are making this unnecessarily complicated.)

2 Likes

If the operator already has to leave the app to fetch the file/image it wants. It seems easier to let him just instantly drop it in a shared folder than going through the vision app. This will also make it way easier to edit those files again.

If the image or file does not directly come from the users filesystem, it should be handled by your code without having to go to perspective. Like pturmel suggested

You can run Vision apps on networks that don't have any file sharing, and using authentication totally separate from any file sharing. I would absolutely not use network shares.

1 Like

Oh, and Vision clients have full access to the local file system--no need to leave the client to access any file. Vision can also use multiple calls to system.util.sendRequest() to pass chunks of a file--enabling both progress bar displays and uploads of very large files.

2 Likes

The image is not passed with the url. Only user, object and description.

Was looking into doing it with message handlers, but I would need to check who sent the message and only update that computers session?

Changed the Page URL to /reports/:input and this binding to the Starting URL on the web browser component: “http://10.13.37.6:8088/data/perspective/client/project/reports/”+{Root Container.db_operator}+";"+{Root Container.object}+";"+{Root Container.description}
In the Perspective view I split input into 3 parts and use it in different components.

The aim is that they can write reports and upload pictures both from the control room stations (Vision) by clicking on an report icon in each object template (and inherit the object name and description)

Also they should be able to use their smartphones (Perspective) when walking around in the plant.

All good so far, now I just have to find a way that the fileUpload and markdown to have a common path that works.

So is the end goal that a operator can take a picture from their smart phone, open up the perspective app and then upload the picture they just took?

It’s always useful to say what the semantic end goal is because with Ignition there are usually 10 different ways to accomplish the same thing and so you might have an idea of what you think you want to do but there may be a built in way or an easier way to handle things.

why do you want to use a markdown to display an image?

The files uploaded need to be available as images that could be inserted into the text.

The Vision popup, top 3 labels comes from the URL.

Using the perspective app they also can use the camera.

Not very responsive, trying to get the flow going first. :slight_smile:

well, you shouldn’t put any security/sestive info in the url, like the username seems not safe

you could access files in the markdown here
C:\Program Files\Inductive Automation\Ignition\webserver\webapps\main

example for image located here named “mmm.jpg”
C:\Program Files\Inductive Automation\Ignition\webserver\webapps\main\mmm.jpg
image

However these might not update as often as you want…

1 Like

All of the operators log in as “op” anyway, that’s how they want it :roll_eyes:
Getting the username in the url is mostly for the future, if they would accept using individual user names and passwords.

The server is not accessible from outside the process network, no internet access.

Thanks! I tried to include to much of the webapps folder structure…

1 Like