I’m trying to be able to define an identifier for each session of a set of pages that will be used in multiple locations, for the same task.
My thought was to use a URL parameter to identify the location, and then map that to a custom session property to use as a global variable for the actions related to that specific location. Is this a viable approach? How do I make that work?
I have the input parameter working, but that just puts it on a view. Do I need to do something like change script on the parameter to write to the session property?
You can assign the input parameter to custom session property by creating a onStartup script of the view. But what are you trying to achieve with the global variable(custom session property) ?
Thanks-the basic idea is that I have a UDT with the variables each different instance of the screen needs, and then everything can be indirect tag referenced into the UDT. Then deploying a new instance is just a copy/paste of the UDT and making sure that the name of the UDT matches the URL string.
Using a session property for this will prevent independent tabs from showing distinct targets. Consider using a docked view as a companion to the page, and have that docked view examine the page's parameters. (Could even be query params instead of URL path params.)
Be aware that using view navigation after page navigation will leave stale values in page.props. You have to jump through some hoops to catch that--best handled in a shared docked view.