Link to home
Start Free TrialLog in
Avatar of rvfowler2
rvfowler2Flag for United States of America

asked on

FM - Request for Scripting Timesaving Suggestions

Had a little project that I thought would take me an hour and ended up taking about 4.  I was to create a new table and pull it back into an existing layout so agents can mark whether someone stood them up on an appointment.  Question:  How do you organize scripts, calcs, etc., to save time?  Use custom functions frequently?  I've also heard something about macro scripts.  I'm new at this.  I'm asking for suggestions, so, of course, there is no right answer.
Avatar of Will Loving
Will Loving
Flag of United States of America image

It's a broad question and the answer - as always - depends on your goals. I'm not sure what is meant by "Macro scripts" but perhaps it's referring to "Master" scripts? I have a set of 50+ "Master" scripts that do various common functions. The advantage to this kind of "modularization" is that if you ever want to change something, you just change it in one place...the master script.

For example, I have several printing related scripts the do such things as set Page Setup to US Letter/Portrait, show the Status Area, Go to Preview, Pause, Print and then Close the Window. When running a report that needs to be in US Letter Portrait mode, I would use the New Window and Go to Layout script steps to get to the report layout, and then just run the Master script to do the rest. i have similar scripts for US Letter Landscape, US Legal Portrait, A4 Portrait etc as well as options to skip the Preview and just print.

While I have separate Master Scripts for these various print operations, it would be quite possible to simply have one Master Print script and to pass various Print Parameters to the script using script variables for Page Size, Orientation, Preview, Show Print Dialog, etc. I can go into that more if you wish. In general, using script parameters is a great way to reduce scripting. You have a relatively generic script and then specify what it is supposed to do when you click *this* button via the script parameters.

The same thing can be done using Custom Menus. If you have a lot of reports, you can create a "Reports" menu. Each menu item calls the same Reports script but the script variable tells it which report to run.

Custom functions can also be incredibly useful in the same way as modularizing scripts. Instead of doing same calculation for something like formatting currency or percentage as text, you use a Custom Function and just call the function.

If you want more details on any specific part of this let me know.

Avatar of rvfowler2

ASKER

Thanks.  I am comfortable with script parameters and use them often (reports, navigation, etc.), as well as custom menus.

Yes, I was referring to Master scripts and I think I understand your concept, but maybe an example would ensure I understand.  Also, any suggestions of where to use custom functions would be appreciated; I only use it currently for phone number formatting.  

One other example I was thinking of was the email script.  I always copy that and never reenter all the config info.

Thanks.
ASKER CERTIFIED SOLUTION
Avatar of Will Loving
Will Loving
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks Will, that's the type of thing I was looking for.