Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

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!!

Posted

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

Posted

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.

Posted

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

Posted

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?

This topic is 8042 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.