jfrick Posted March 11, 2003 Posted March 11, 2003 I've created a script that imports a Juno addrbook.nv file and exports it in MS-Outlook Express address book format. The script performs 8 sub scripts the 3rd script of which isn't working when performed from the main script but works great if I run each script individually. The script not working looks like this: Go to record [first] Replace [No dialog, "RecordID", "Serial numbers"] Any ideas?
jasonwood Posted March 11, 2003 Posted March 11, 2003 Put a "beep" or "show message" step to see if the script ever gets called. My guess would be that you're not running this script as a subscript, you're probably calling another one with a similar name.
jfrick Posted March 11, 2003 Author Posted March 11, 2003 It's a mystery to me. The sub-scripts appear not to be running. I added a beep and made sure the Perform sub-script box was checked. No beeps. Anyways I gave up and just used loops instead. Thanks for your input.
Pupiweb Posted March 12, 2003 Posted March 12, 2003 Make sure the RecordID field is on the layout when you run the replace else it won't be executed
BertBoye Posted March 12, 2003 Posted March 12, 2003 I had the same problem in my solution, i solve to problem with this scripting. set errorcapture [on] Replace [No dialog, "RecordID", "Serial numbers"] if["status(currenterror)<>0 Replace [No dialog, "RecordID", "Serial numbers"] end if Maybe these will work for you.
Vaughan Posted March 12, 2003 Posted March 12, 2003 Sorry Bert I don't understand your script. It says: perform a replace, if there is an error perform the replace again. What's to suggest the second attempt at a replace will be successful?
Vaughan Posted March 12, 2003 Posted March 12, 2003 The Replace command only works if the field is on the current layout. Was the database multi-user with another guest using it? That would create locked records, and locked records cannot be modified so the Replace step fails. Other ways of doing it include using a loop instead of replace, using Set Field [] on each record and checking for errors. A warning message can be created to indicate that one or more records could not be updated. It'd look something like: Set Field [gReplaceError, 0] Go to Record [first] Set Error capture [on] Loop Set Field [whatever, whatever] If [status(CurrentError) <> 0] Set Field [gReplaceError, 1] End If Go to Record [next, exit after last] End Loop If [gReplaceError = 1] Show Message ["One or more records could not be updated."] End If
Recommended Posts
This topic is 7930 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