KurtW Posted July 15, 2004 Posted July 15, 2004 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
DanBrill Posted July 15, 2004 Posted July 15, 2004 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
KurtW Posted July 15, 2004 Author Posted July 15, 2004 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
Ender Posted July 15, 2004 Posted July 15, 2004 I always use navigation scripts to switch layouts, and disable access to the layouts in the status bar.
KurtW Posted July 15, 2004 Author Posted July 15, 2004 Ender: Do you then attach those nav scripts to buttons, or do you run them from events? Kurt
Ender Posted July 15, 2004 Posted July 15, 2004 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.
KurtW Posted July 15, 2004 Author Posted July 15, 2004 Ah, that makes sense. Am now toying with using a new window as a floating menu. Ought to be fun.
Recommended Posts
This topic is 7439 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 accountSign in
Already have an account? Sign in here.
Sign In Now