Using Ignition 8.1.43 to create Perspective pages that will be used within our production space by multiple people. These views are Public and do not require authentication. I am looking for a way to persist values or selections within Perspective so when the browser is closed and re-opened the values load back in. From my understanding session props are only available while the session is open and once the browser is closed these go away. I was looking into using browser local storage or cookies, but it seems that because perspective scripts are gateway scoped this may not be an option. Any thoughts or ideas would be greatly appreciated.
If this is based on a particular computer in your local network, you may be able to use the client IP as a primary key for storing selections in a database table, and just load the table values on startup of the views.
You can also use UDTs. Create the tags of the data you want to save, then instantiate the UDT with a unique id that corresponds to the username or some other identifier.
Periods cannot be used in tag names, so you'll have to get a little more creative than straight IP addresses.
Our HMIs are static IPs with dedicated subnets, so I use an expression that creates an ID like Silo 24
where 24 is the last octet of the IP.
After that, bind the UDT tags to your props with bidirection on.
We most certainly can use a database to store these values and recall them again when the view is opened from that specific computer or user. Not sure how we can identify the client or the machine that opened the view though. The IP address is not static for PCs. I was hoping to be able to get the MAC address or even the user logged into Windows because users do not have to authenticate into these perspective pages.
You cannot get the MAC address from a browser. If you could it would be considered malware and quickly patched.
I see quite a few answers here that have possibly helped you, I wanted to add if you can't go by specific IP addresses. You can use a parameterized URL
For example if you have a specific team working on values then that team can use a specific URL to load their data anywhere in the production space.
Example:
IgnitionGateway:8088/data/perspective/client/Project1/ATeam
IgnitionGateway:8088/data/perspective/client/Project1/BTeam
As to how you would implement it you can user either a DB or UDTs to hold those values and load in other sessions.