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

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

Recommended Posts

Posted

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?

Posted

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.

Posted

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.

Posted

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.

Posted

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?

Posted

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

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