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

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

Recommended Posts

Posted

I'm building a program to look up an area code and display the time it is currently in that area code.

I have a script which enters find mode, then I want it to perform the find and after the record is found and displayed, calculate and display the time at that area code. The problem is that after entering find mode it immediately goes to the calculation line. Putting a pause it doesn't stop this.

Any ideas how to do this in the same script?

Posted

I just do the following:

Enter Find Mode[]

Set Field[AreaCode::Curr_Time; ... (it does a long calculation here to find out the time difference, but I'll skip the details)

The script enters Find Mode and goes right to the calculation before I can put in the new area code. I know I could do this in two separate scripts, the first to Find the record and then making the end-user click on a 'Calculate Time' button, but would like to do it automatically each time a new area code is chosen.

Posted

You are never performing the find, it seems. You are also entering the Curr_Time as find criteria, instead of setting a found record in Browse Mode.

Allow User Abort [Off]

Set Error Capture [On]

Enter Find Mode [Pause]

Perform Find [ ]

If [not Get(FoundCount)]

Modify Last Find

Show Custom Dialog ["No records found."]

Show All Records

End If

Set Field [AreaCode::Curr_Time; ...]

But, why not just use an unstored calculation to determine the time? If you do it the scripted way, only the first found record will be accurate.

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