Is there an easy way to log when users visit specific screens?

Over the course of COVID one of the schools I worked for made a LOT of changes as to how they delivered curriculum. Often I'd create new layouts and/or scripts to "test out an idea" for a specific user. Some of these things are only used once or twice a year (state reporting), others are used daily, and many aren't used any more at all.

I'd love to clean them up, and I wonder if there's a best-practice for logging these sorts of things.

Right now is I have about 20 screens that I'm pretty sure aren't used any more. I'm thinking of creating a script that happens whenever the layout is loaded which logs every time someone goes to the screen, and if the screen isn't visited in a 12 month period to delete it.

Is there some "global" way to do that for all screens and scripts? I'm thinking probably not, so I'm thinking of writing something fairly generalized which I can copy-paste into the top of every script that I think is unused, and every layout I think is unused.

The other thing I've done in the past is put big ugly red letters in the middle of a screen or an alert in a script which says "If you still use this, let me know, otherwise I'm removing it on Dec 15, 2023) and then I rename the script or layout (delete after 2023 12 15_.

For the layouts you could use the 'OnLayoutEnter' script trigger (has to be set for each layout you want to monitor) and make the trigger execute a script that writes a timestamp, username and layout name in an audit table.


I want to support @Torsten's suggestion to log and audit the use of layouts and scripts is. It automates the work. It doesn't bug people and it gives you the evidence you need. Of course, you have to remember that layouts that do not have any activity will be silent and will not appear in the logs.

Thanks. That's what I was planning on doing... was just wondering if there's any built in logging or anything that could do that for me.

This sort of logging is a DIY affair. There is no global method. Fortunately you only have twenty layouts.

Well I have 250 layouts, but I have about 20 that I manually identified as probably not needed any more.

I think has all you need


YES! this is what I'm looking for. I'm unclear from their directions if it works on servers but I'll play around.

In addition to the guidance provided above, my approach would be to add a scripted button (for example) on my admin dashboard (in the FM solution, not referring to the FMS admin console), that searches the log table (by Loop, While, whatever) for any of the ~20 layouts not entered within the appropriate time period (1 year in your example). This script would just return a list of layouts not entered within a year, and the last date entered (in case I want to let it slide for a bit longer). Or find those with entries and then view those omitted, etc.

Of course, this could also be handled with a layout with a filtered portal showing such layouts. Or run the script on a simple layout that provides a list view of the data meeting the criteria. As usual, more than one way to get there.

Edit: slight clarification

1 Like

Nice... good call. I probably would have tried to parse it manually for the first 10 before thinking of this... lol