July 15, 200421 yr Hi there: Is there a way to attach a script to a layout such that just opening/visiting the layout launched the script? Thanks Kurt
July 15, 200421 yr One way to do it is to just attach the script to whatever button you click to get to the layout. But this isn't foolproof as the user might get there by seecting it from the status area, or being taken there from a related file, etc. So a new way I'm playing with is to use the example plugin that allows you to start a script when a field is changed. Create an unstored calc field that launches your script. Put this on the layout. When the layout is opened the field recalculates (since it is unstored) and triggers the script. See the attached example. HTH, Dan test.zip
July 15, 200421 yr Author Thanks Dan! That sounds promising. (And you are right, the user will most likely get to the layout without a button as it is the manin/switchboard setup for the system.) I DL'd your example and will try it tomorrow when I am fresher and have had a chance to try and figure out the event trigger thingee. Thanks Kurt
July 15, 200421 yr I always use navigation scripts to switch layouts, and disable access to the layouts in the status bar.
July 15, 200421 yr Author Ender: Do you then attach those nav scripts to buttons, or do you run them from events? Kurt
July 15, 200421 yr Buttons in a typical tabbed interface are the main navigation. Some process scripts will also call a nav script as a last step to put the user back to a different layout. As an example, if the user's security level for a particular area is read-only, then the nav scripts brings up the view layouts. If the user has read-write access, then the nav scripts brings up the entry layouts.
July 15, 200421 yr Author Ah, that makes sense. Am now toying with using a new window as a floating menu. Ought to be fun.
Create an account or sign in to comment