AnsweredAssumed Answered

Fixing a bug in a script

Question asked by lmack on Dec 12, 2018
Latest reply on Dec 12, 2018 by philmodjunk

I'm working on student registration in a student database. The registrations come in by email. The email is cut and pasted into a field in the database. I've created calculation fields to extract the relevant data from the email.


My registration script includes a subscript to set fields in the record with the student's name, address, etc. I have two versions: one for new students and one for returning students. The only difference in the scripts is that the returning student script doesn't copy the name.


The returning student script works fine. The new student script copies none of the registration email data to the record.


I've been playing with the new student script. By making it essentially a duplicate of the returning student script and adding a separate subscript to copy the name, I've got it working - except it still won't copy the name. When I run the script to set the name fields on its own, it works. It won't work in the registration script.


Right after the registration email gets pasted, I've got a resume script button. That seems to be where the bug is. I have to push the button multiple times before it will run the rest of the script. Clicking the script continue button in the menu bar has the same problem. Once the script resumes, it doesn't run correctly - it skips a pause step I added so I could check it and maybe messes up in other ways.


If anyone has some experience with this or insights, I'd be super grateful. I've had plenty of challenges in writing scripts and getting all the moving parts working together, but I'm don't have experience fixing what looks like an FM glitch of some kind.


Thank you!