How to add application timeout script in perspective?

@Transistor @schenk @victordcq

Thank you all for the support.

The script and the logout action are now working fine!

These are the steps that I have followed:

  1. I created two session props ‘idletime’ and ‘timeout’.
  2. Created an integer memory tag with the name ‘idletime’ and bind it with numeric entry perspective component.
  3. Binded the session property ‘timeout’ with the ‘idletime tag’
  4. Expression binding on ‘idletime’ session prop:
now(1000) - {session.props.lastActivity} > {this.custom.timeout}

and in change property script:

   if currentValue.value == True:
      system.perspective.closeSession()
   else:
      return currentValue
  1. Entering time in milliseconds in numeric entry. When lapsed seconds > user input seconds then the session is closed and user need to login to view the page again.