Thanks Steve, can't think why I did not think to test BEFORE running the
GTRR.....

And to Winfried - it's good to know that both layout and the related table
found set remain unchanged if there are no related records.

Much appreciated input from the list once again.

Rgds
Peter

 

-----Original Message-----
From: FileMaker Pro Discussions [mailto:[email protected]] On
Behalf Of Steve Moore
Sent: 22 June 2011 13:29
To: [email protected]
Subject: Re: Go to related record

Hi Peter,

In your script, you can check to see if any related records exist with this:

If [ not isempty(RelatedTable::RelatedTableID) ]
   GTRR
   do your stuff
Else
   No related records exist
End If

HTH
--
Steve Moore
Cumberland, Maine


On Jun 22, 2011, at 6:26 AM, Peter Buchanan wrote:

> When using the Go to Related Record script step, is there a specific error
> code to look for with Get Last Error, for example if there are no related
> records? I am trying to figure out what happens if there are no related
> records :
> 
> I am using GTRR, and then importing the related records into another
table.
> How do I ensure only the related records (matching the current record) are
> imported? Will GTRR still go to the layout (in related table) specified in
> this command, even if no related records? Will the found set in related
> table be nil records if no related records, or will it comprise all
records?
> 
> Much appreciate any advice on checks to use with this script step.
> 
> Regards
> Peter

Reply via email to