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

**URL:** <https://the.fmsoup.org/t/is-there-an-easy-way-to-log-when-users-visit-specific-screens/3675>\
**Category:** Floating Topics\
**Tags:** debug, logging\
**Created:** [August 29, 2023, 2:02pm UTC](https://the.fmsoup.org/t/is-there-an-easy-way-to-log-when-users-visit-specific-screens/3675 "2023-08-29T14:02:19Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![JasonMark](https://avatars.discourse-cdn.com/v4/letter/j/a9adbd/32.png) [@JasonMark](https://the.fmsoup.org/u/JasonMark)\
**Post date:** [August 29, 2023, 2:02pm UTC](https://the.fmsoup.org/t/is-there-an-easy-way-to-log-when-users-visit-specific-screens/3675/1 "2023-08-29T14:02:19Z")

</div>

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\_.

---

<div class="post-metadata">

**Author:** ![Torsten](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/torsten/32/1574_2.png) [@Torsten](https://the.fmsoup.org/u/Torsten)\
**Post date:** [August 29, 2023, 2:34pm UTC](https://the.fmsoup.org/t/is-there-an-easy-way-to-log-when-users-visit-specific-screens/3675/2 "2023-08-29T14:34:46Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Malcolm](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/malcolm/32/196_2.png) [@Malcolm](https://the.fmsoup.org/u/Malcolm)\
**Post date:** [August 29, 2023, 8:03pm UTC](https://the.fmsoup.org/t/is-there-an-easy-way-to-log-when-users-visit-specific-screens/3675/3 "2023-08-29T20:03:16Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![JasonMark](https://avatars.discourse-cdn.com/v4/letter/j/a9adbd/32.png) [@JasonMark](https://the.fmsoup.org/u/JasonMark)\
**Post date:** [August 29, 2023, 11:44pm UTC](https://the.fmsoup.org/t/is-there-an-easy-way-to-log-when-users-visit-specific-screens/3675/4 "2023-08-29T23:44:31Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Malcolm](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/malcolm/32/196_2.png) [@Malcolm](https://the.fmsoup.org/u/Malcolm)\
**Post date:** [August 30, 2023, 5:58am UTC](https://the.fmsoup.org/t/is-there-an-easy-way-to-log-when-users-visit-specific-screens/3675/5 "2023-08-30T05:58:15Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![JasonMark](https://avatars.discourse-cdn.com/v4/letter/j/a9adbd/32.png) [@JasonMark](https://the.fmsoup.org/u/JasonMark)\
**Post date:** [August 30, 2023, 12:11pm UTC](https://the.fmsoup.org/t/is-there-an-easy-way-to-log-when-users-visit-specific-screens/3675/6 "2023-08-30T12:11:13Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![mike275](https://avatars.discourse-cdn.com/v4/letter/m/7993a0/32.png) [@mike275](https://the.fmsoup.org/u/mike275)\
**Post date:** [August 30, 2023, 1:25pm UTC](https://the.fmsoup.org/t/is-there-an-easy-way-to-log-when-users-visit-specific-screens/3675/7 "2023-08-30T13:25:13Z")

</div>

> **[Free PBS Logging Add-On](https://www.portagebay.com/blog/free-pbs-logging-add-on/)**
>
> One of the most exciting new features of FileMaker 19 is the ability to create custom add-ons. Beyond the set of default add-ons available with any FileMaker client installation, developers now have the ability to design and deploy custom add-ons...

I think has all you need

---

<div class="post-metadata">

**Author:** ![JasonMark](https://avatars.discourse-cdn.com/v4/letter/j/a9adbd/32.png) [@JasonMark](https://the.fmsoup.org/u/JasonMark)\
**Post date:** [August 30, 2023, 3:00pm UTC](https://the.fmsoup.org/t/is-there-an-easy-way-to-log-when-users-visit-specific-screens/3675/8 "2023-08-30T15:00:29Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![daleallyn](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/daleallyn/32/819_2.png) [@daleallyn](https://the.fmsoup.org/u/daleallyn)\
**Post date:** [September 3, 2023, 6:58am UTC](https://the.fmsoup.org/t/is-there-an-easy-way-to-log-when-users-visit-specific-screens/3675/9 "2023-09-03T06:58:16Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![JasonMark](https://avatars.discourse-cdn.com/v4/letter/j/a9adbd/32.png) [@JasonMark](https://the.fmsoup.org/u/JasonMark)\
**Post date:** [September 3, 2023, 7:11pm UTC](https://the.fmsoup.org/t/is-there-an-easy-way-to-log-when-users-visit-specific-screens/3675/10 "2023-09-03T19:11:00Z")

</div>

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