crazybake Posted November 18, 2002 Share Posted November 18, 2002 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!! Link to comment Share on other sites More sharing options...
djgogi Posted November 19, 2002 Share Posted November 19, 2002 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 Link to comment Share on other sites More sharing options...
Vaughan Posted November 20, 2002 Share Posted November 20, 2002 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. Link to comment Share on other sites More sharing options...
djgogi Posted November 20, 2002 Share Posted November 20, 2002 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 Link to comment Share on other sites More sharing options...
crazybake Posted November 21, 2002 Author Share Posted November 21, 2002 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? Link to comment Share on other sites More sharing options...
Recommended Posts
This topic is 7962 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