Newbies j.wegner Posted June 4, 2010 Newbies Posted June 4, 2010 Hi all, Just as a quick note I develop in FMPA11, but the entire company I work for runs FMP9 with a FMS9 server, so all solutions MUST be backwards compatible. Right now we are facing some speed issues on our daily schedules. I think I may have found a great script modification to enhance our speed. I just want to double check that the change I make will not change the end-game result of the script. Here is the previous script : If [ Get(FoundCount) > 0 ] Go to Record/Request/Page [ First ] [color:red]Loop Set Field [ Job Form Steps::currently_scheduled_time; Job Form Steps::current_time_display ] Go to Record/Request/Page [ Next; Exit after last ] End Loop End If Go to Record/Request/Page [ First ] If I replace that red part with a Replace Field Content[Job Form Steps::currently_scheduled_time; Job Form Steps::current_time_display] will that do the same thing? From my testing, it appears the same and it is MUCH faster. Thanks for your help, JWegner
bruceR Posted June 4, 2010 Posted June 4, 2010 You forgot the freeze window step. Somewhere before loop.
Ocean West Posted June 4, 2010 Posted June 4, 2010 (edited) However - the issue with replace is that a user (in a multi-user environment) may have an uncommitted or open record, you have now way to know what record did not receive the update. With a looping script, you could trap for error and store that record id in such a way to try again your script at the end of the loop, as the user may have moved onto an other record. Or at the very least present you with a list of records for you to verify that the procedure accomplished it's task. In either case make sure your on a FORM view layout or switch it to form view during the loop, can prove to be faster too. I have't tried it some say that perhaps a plugin that does SQL commands can be pretty fast too. - not sure the good bad or ugly that it presents but may be worth a try. Edited June 4, 2010 by Guest
Newbies j.wegner Posted June 7, 2010 Author Newbies Posted June 7, 2010 Hey guys, Thanks for the input, I really appreciate it. BruceR, great idea with the freeze window step. I'll put that in the base script ASAP. Ocean West, just by the nature of our database, this replace function doesn't really need to take into account multi-user problems. It would be nice if it could be both, but the speed of the function is significantly more important in this case. I like the SQL Plugin idea. I looked around the web for one, but couldn't find a great option. Any suggestions on where to look? Any free ones out there? ________________________________________________ I am going to be implementing this change tomorrow morning into our scripts. From everything I can tell, there should be no issues. Unfortunately, my luck is never that good. Any last minute problems, or things I should be looking for? Thanks guys, JWegner
Ocean West Posted June 8, 2010 Posted June 8, 2010 The best plugin is prob SmartPill cause it can do SO much more than just SQL but there are a few other plugins just for SQL 24u http://www.24usoftware.com Comm-unity Networking http://www.cnsplug-ins.com myFMButler http://www.myfmbutler.com yooPlugins http://www.yooplugs.com Qutic Development http://www.qutic.com Scodigo (SmartPill) http://www.scodigo.com/ WorldSync (FMDataGuard - does more but uses the SQL calls to do its magic) http://www.worldsync.com
Recommended Posts
This topic is 5283 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