November 18, 200223 yr I have created an app that schedules four pieces of equipment. These pieces of equipment are in a seaparte DB with hourly rates etc. In my scheduling app I have a popup menu which lists these pieces. The user will select the piece of equipment and a date. All is well until they click the schedule button. This script takes you to an "equipment" layout.. This script sets the equipment popmenu result to a global field. The script starts at the first record and compares global to equipment pieces (i.e. "set field global to equipment... if global != "piece1" omit record... go to record request next.. and it performs the same tasks. The problem is that it does not omit the records. it seems as though every other record or random records are omitted. thanks for any help...sorry so long winded!!
November 19, 200223 yr Don't put Go To Record [next] after the Omit step . Instead use following: Freeze Window Set error capture [on] Go To Record [first] loop Set Field [global, equipement] if [global != "piece1"] Omit else Go To Record [Next,exit after last] end if end loop Dj
November 20, 200223 yr What's the "Set Error Capture [On]" step for? If you want to prevent users from cancelling scripts use the "Allow User Abort [Off]" script step.
November 20, 200223 yr Because I ALLWAYS use error handlers. And in this particular case since I didn't handle no records present situation (Go to record [first] would generate 101 error code if no records present) I've prefered to ignore it. And yes, i know that in this situation there would be no system messages even if the above error occured Dj
November 21, 200223 yr Author Thanks!! This worked perfectly!! The only question I have is that if I don't have a valid reocrd how do I prevent the script from continuing to run ... through validation and dialog box?
Create an account or sign in to comment