Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating Individual Record Print Preview Script 2

Status
Not open for further replies.

Cradders

Technical User
Jul 21, 2005
25
FR
Hi guys,

I'm getting pretty fandangled on this FM thing now... so much so that I've gotten out of my depth (again) and need your trusty help.

On my Invoice data entry form I have added a button "Preview Invoice" which I want to go to the 'Print Invoice' layout and show the details of the same record, with a pause, to let the viewer see if it's OK. Then they can return to the browse mode in the Invoice data entry form to make any changes. (Or hit another button to Print or Save as PDF - which works perfectly)

I've created a script to do this, but the problem is instead of finding ONLY the record you were just looking at, it finds ALL the records once in preview mode. How do I get it to only show that one related record?

Here's what I've got so far:

Go to Layout ["InvoicePDF" (QLDGInvoices)]
Enter Preview Mode [Pause]
Go to Layout [QLDGInvoiceGenerator" (QLDGInvoices)]
Enter Browse Mode []

Any ideas? I tried a few things with 'Go to Related Record' but it didn't help.

Cheers,
Cradders
 
Er, I've just realised that the PDF and Print scripts I've made do only select one record, but it's the FIRST record, not the record I was in when I hit the button to perform the script. So obviously I'm lacking the bit where I tell it I only want this current record to show while the script performs.

Help?

:)
 
You have to isolate your record first.

Try a combination of:

Find All
Omit
Find Omit

this will give you a found 'set' of your current record.

HTH
 
Sorry Jean W,

Not being a programmer I don't quite understand you - could you be a little more specific?

sorry for being a database spaz!

[ponder]
 
To isolate the current record in the current file you could use a script like along these lines:

Show All Records
Omit Record
Show Omitted

To isolate a record in a related file, make sure you have a relationship that is unique in values for the given record and make a script along these lines:

Go to Related record

and check Show only related record.

Now you can navigate back and forth between tose records.
 
Hi Jean,

I gave that a go but it came up with an error:

"There are no valid criteria in this request. Type a valid request before clicking Find."

Where is the option to Go to related record and Show only related record? That sounds like what I want but I can't find this option.

Am I doing this in the right place, in the scriptmaker?
 
)Hi Cradders - I have a VPN pipe open and can't send email so here it is)

Starting from scratch...

1) Make sure your GTRR goes to a layout for the Invoice Detail table.
2) Assure the relationship is based on the Invoice No. (unique)
3) Assure you check the Show Only Related Records checkbox.

This will present a list of all details items for that one invoice.

Then, to show only the one detail record (invoice line item)...

4) While in the Invoice Detail, use the following script steps:
Show All Records
Omit Record
Show Omitted Only
(don't use Find)

This should work

--------------------------------
Jeff Duck
FileMaker 7 Certified Developer
 
There is no Find involved in this.

Just make two scripts with the given steps.

You can find them in ScriptMaker in the left pane.

The GTRR step will have a few more choices to enabl, like which relationship (you need this first) and the Show only related box, which you need also.

See the help file for GTRR step....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top