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

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

Recommended Posts

Posted

Greetings All,

I have and invoice DB (Invoice.fp5), a jobs DB (Jobs.fp5), and a services DB (services.fp5).

Both the services DB and the jobs DB call scripts in the invoice DB to create an invoice for the respective module. After the invoice is created, there is a button in the invoice module ("Print/Record") that runs a script ([bTN] = Print/Record Invoice) that will send the invoice to the printer, and set the invoice as recorded.

All I want to do in this script is test the invoice type, jobs or services, and return to that file with focus. But the way the script ends, with If/Else steps, the script need to return back to the invoices module to finish the script so the focus always ends up on the invoice module. Here's the tail end of the script:

If [ InvoiceType = 1 ]

Perform Script [ Filename: "Jobs.fp5", " = Show Jobs Due" ]

[ Sub-scripts ]

End If

If [ InvoiceType = 2 ]

Perform Script [ Filename: "Services.fp5", " = Show Services Due" ]

[ Sub-scripts ]

End If

Can anyone recommend a way to get back to the calling file with focus? I'm sure this is a common complaint, but how do you guys solve this problem?

-Frank

Posted

I'm not sure from the above whether the "[ Sub-scripts]" are in the external file or not. A sure-fire way to make a Go To Layout stop in the external file is to end it with a "Halt" step. It will be the last step performed, so don't put anything after it (other than End If).

Posted

Yep...the Halt Script step in the external file was the key I was missing. I actually had Exit script there as a last script step and that was not working.

But Halt Script as a last step works.

Thank You!

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