DataPro Posted July 24, 2005 Posted July 24, 2005 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?
DataPro Posted July 25, 2005 Author Posted July 25, 2005 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.
-Queue- Posted July 26, 2005 Posted July 26, 2005 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now