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.

Way to Detect Opening of Layout from Snapshot Link

Featured Replies

I am using the MasterDetail layout from Todd Geist in a couple of places in our database. By default this layout loads the first 2000 records into the MasterDetail portal. In order to save time and bandwidth I've added some logic to perform a find for only active records on the first navigation to the layout. This OnLayoutEnter behavior is only done for the first navigation to the layout, because I don't want it to interfere with any found sets the user may have isolated on subsequent navigations. I've also added an OnModeEnter script trigger to detect entry into Browse Mode, which successfully squelches this auto-find behavior in the event a user navigates to the layout in find mode, and then performs a find.

The logic looks similar to this:

Quote

 

set variable $trigger = value passed in from relevant script trigger calls

If ( $trigger = "OnModeEnter" and Get ( WindowMode ) = 0 )

set variable $add_layout_to_list ; True

else if ( $trigger = "OnLayoutEnter" and not ( Position ( $$first_navigation_find ; Get ( LayoutTableName ) ; 1 ; 1 ) )

perform find on active field for table

set variable $add_layout_to_list ; True

end if

if $add_layout_to_list

set var $$first_navigation_find ; If ( not IsEmpty ( $$first_navigation_find ) ; $$first_navigation_find & "pilcrow" ) & Get ( LayoutTableName) 

end if

 

So far so good. This works okay. The remaining issue, however, is that our users sometimes want to make snapshot links to these layouts. Unfortunately I don't know how to detect the layout is opening for the first time in a session from a snapshot link. As a result, the auto-find overrides the snapshot link found set.

Is there any way around this? A way to detect opening from a snapshot link, or perhaps some superior logic to approaching what I'm trying to do here that isn't prone to this problem?

 

Create an account or sign in to comment

Important Information

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

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.