Jump to content
Server Maintenance This Week. ×

Trigger a script upon layout selection?


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

Recommended Posts

I am looking for a way to start a script each time a given layout is selected via the layout menu, not a button.

For example, I am building a custom search layout, so I would like the page to automatically default to "Find Mode" when the visitor selects that page, and then upon exit reverts back to "Show All Records".

Is this possible, and if so, can someone point me to some instruction?

Thanks,

Brad

Link to comment
Share on other sites

No. You are much better off not allowing layouts to be changed manually and using buttons anyway. You can, however, create a mock layout menu, formatted as a pop-up menu, and attach a button to the field to

Allow User Abort [Off]

Go to Field [globalLayoutMenuField]

Pause/Resume Script [1]

Go to Layout [Layout Name by calculation: globalLayoutMenuField]

If [globalLayoutMenuField = "layout1"]

Enter Find Mode [ ]

Else If [globalLayoutMenuField = "layout2"]

Show All Records

Else If ...

...

End If

Link to comment
Share on other sites

This topic is 7026 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.