Jump to content

Syntax I Believe...


This topic is 7826 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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

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 wink.gif

Link to comment
Share on other sites

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 smirk.gif

Link to comment
Share on other sites

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

This topic is 7826 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.