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

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

Recommended Posts

Posted

Hi,

I want to set up a script that will change layouts from browse to preview and bring up the record that was being browsed. Every time I set up a script, the record that the script previews is the first record in the database. How do I tell the script that I want the current record to be previewed?

Thanks,

Constance

Posted

The easiest way is to reduce the Found Set to just that single record before previewing. That will have what may be the undesired side effect of destroying your original found set however.

What are you actually trying to do here?

Old Advance Man

Posted

I basically want to make people's life easier by running a script that will take the current record, put it into a different layout in preview mode so that they can check to make sure it looks fine and then print it.

eg. A person enters a new invoice in layout 1 where there are a lot of other fields besides what needs to be printed. The person wants to preview the invoice before printing it out to make sure all the data is there or correct etc.

Posted

At least 2 ways to do this.

First one is to isolate the record you want, switch layouts, go to preview mode. Doing that destroys the rest of the found set however. But it does work.

Another is to make a shadow file. This is a file with one record that is related to the invoices file. It has all the related fields from invoices arrayed as you want them to print. The relationships is established by setting a value in a key field (global field) in the shadow file that will match a unique value in an invoice record. When that is done the dta are displayed and can be printed.

HTH

Old Advance Man

Posted

Show all records

Omit record

Show omitted

Go to layout [PrintLayout]

Enter Preview Mode [Pause]

Show message ["Do you want to print?"] (with "Yes" and "No" choices)

If [status(CurrentMessageChoice=1)

Print

End If

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