Perspective run script after inactivity timer elapses

I need to run a script to turn off some boolean values in a few page custom properties if there are 2mins of inactivity on the client. How would I do this?

1 Like

I also need this

In an upcoming release, we’re planning to add a lastActivity session prop, which would allow you to drive whatever logic you want via a property change script.


I haven’t experimented with this yet, but I’m wondering if you could set up your project (In Project>Project Properties>Inactivity) to enable an inactivity timer of 2 minutes which would generate a message to the user. Then create a Session Message Event script that would fire when this message comes through in which you can set your booleans as desired.
Optionally, you can configure the project to have a longer grace period if you don’t want to actually log them out or close the session after 2 minutes.
The lastActivity session prop would definitely be a preferred solution though.

This would all be achievable and fully customisable with the lastActivity session prop :slight_smile:

Just bumping this old post now that lastActivity is available in the designer post 8.1.8. Thanks guys!

What’s the most efficient use of it? I’d like to navigate to another view if no activity occurs for ‘x’ seconds. I’m thinking of creating a custom property that houses the current datetime, then put a property change script on that tag that if it’s been longer than ‘x’ seconds, then fire a navigation event. Is there a more efficient way to do this though?

Thanks again!

Is there any work around to implement this functionality in version 8.1.7?

No. Upgrade.

You don’t have the ability to author your own code that runs on the browser in Perspective, very deliberately.

1 Like