Jump to content

Way to Detect Opening of Layout from Snapshot Link

This topic is 2930 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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:



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?


Link to comment
Share on other sites

This topic is 2930 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...

Important Information

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