Perspective session table values disappear when I navigate away from pop up

Hello, I use a table with Tag history in aggregation mode: Count; to count the instances a signal is triggered in the PLC.

I use an event script with the buttons below the table to set a {start date} custom property of [now(0)] in the table, which is used the historic date range "start date" and it works properly counting the instances for which every signal is triggered.

The problem is that the counts do not stay "logged" in the table when the user navigates to another page (or closes the popup when I tried it as popup). Is there a way to retain the {start count} of the binding?

Create a session variable and save the value there.

  • In the Project Browser, select Perspective.
  • In the Perspective Property Editor, select SESSION CUSTOM.
  • Create your session variable there.

Bind the chart “start date” to your new session variable.
Edit your button “onClick” event code to write to the session variable rather than to the table. e.g.,
self.session.custom.myStartDate = startDate
You can select the session variable from the Browse Properties button on the top-right of the script action editor.

1 Like

Works well, thanks!