Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Layout Use Frequency

Featured Replies

This may seem like a strange request, but I am wanting to know if anyone has a handy way of being able to tell when a layout was last used? 

I ask this as I would like to delete some layouts that are no longer used but i don't want to do this if my users still need them, there have been a lot of requests for layouts showing information that I am sure are no longer needed / or haven't been used for a while.

You could add a logging mechanism to your navigation. Then review the logs. 

  • Author

I have previously attempted something like that but I get caught in an infinite loop.

On Layout Enter

Set Variable [$LayoutName; Value: Get (LayoutName)

Go to Layout["LayoutUseage" (LayoutUseage)]

New Record/Request

Set Field [LayoutUseage::Layoutname;$LayoutName]

Close Window [Current Window]

Go to Layout [original layout]

The problem with this is, the instant I go back to the original layout the Layout Enter script fires again and I'm caught in a loop.

 

 

You need a way to turn off the trigger after it's fired.

If the first step in your OnLayoutEnter script trigger is this:

Freeze Window

If [$$Triggers]//this should be populated on first window open with a value of 1

    Set Variable....//layout name

    Set Variable[$$Triggers; ""] //turn trigger off so the script wont fire again with new window

    New window...

    Go to layout...

    New Record Request...

    Set Field....

    Commit Records...

    Close Window

    Set Variable[$$Triggers; 1]// turn triggers back on

End If

If you go to the layout, the script runs.  It will grab the layout and set a variable.  When the new window pops up, at that point the trigger will fire, but because it's turned off it wont do anything.  The script will continue, the trigger will be reset, the window will close and the user will never know

Edited by Steve Martino

24 minutes ago, lucyblade said:

The problem with this is, the instant I go back to the original layout the Layout Enter script fires again and I'm caught in a loop.

Instead of fighting with this, why don't you sidestep the problem by triggering the script OnLayoutExit? Then your script could be simply:

Set Variable [ $layoutName; Value:Get (LayoutName) ]
Go to Layout [ “LayoutUseage” (LayoutUseage) ]
New Record/Request
Set Field [ LayoutUseage::Layoutname; $layoutName ]
Exit Script [ Result: True ] 

 

Another option would be to write the log into a global field/variable, and transfer the data as part of your closing script.

  • Author

Thanks Steve Martino, this worked a treat :O)

Comments ideas are (always) better, especially writing to a global variable.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.