Since custom session props now take the place of Vision Client tags, it would be useful to have script functions added to read and write to these as you would with tags (
These would be useful and far more intuitive to newcomers.
For example, in Vision I might have a template with a string param where I could set it to the path of a Vision client tag, then inside the template I could read and write to the tag via script with the
system.tag.read/write* functions, all searchable within the “intellisense” or the user manual if you weren’t aware these existed.
In Perspective, this is still possible, you can pass the View template a path to the custom session prop and then read/write it from script, however you must use the standard Python functions
getattr which aren’t inherently obvious, especially not for newcomers!
# read session.custom prop value getattr(self.session.custom, self.view.params.sessionCustomPropPath)` # set session.custom prop value setattr(self.session.custom, self.view.params.sessionCustomPropPath, 'newValue')