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

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

Recommended Posts

Posted

Hi all:

I am getting some weird script results and was wondering if anyone can spot my error.

I have a scripr that asks the user if they want to print some records. If they choose 'Yes' it prints fine then asks if they want to mark these records as sent. Here's where it breaks down. If user chooses 'No' to print but 'Yes' to mark as sent, it works fine.)

The block that is vexing me is marked in red in the attached .gif.

No matter what I do, the script just seems to skip the Replace Contents step. I placed a DEBUG to prove that this portion of the script is firing, and it is. I return the DEBUG.

But the next step, Replace, doesn't fire or offer a dialog. So I added an If-End If to see if there has been an error. At first I did:

If[Get(LastError)> 0]

... and it fired the enclosed DEBUG. Realizing that didn't tell me enough I then rewrote that snippet to return the error if the error WASN'T 0. Guess what - I return an error of ZERO when this fires.

I am really lost here. Why am I returning an error 0 with:

If [Get(LastError) <> 0]?

And if Error code 0 means NO ERROR, why won't this section perform the Replace Contents, but the later section will?

Thanks in advance for any help you can give

Kurt

Script.gif

Posted

Found answer, and it's of the 'DUH' variety. You can't alter records while you are in PREVIEW mode, of course.

All is well now.

Kurt

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