ChrisVanBuren

FileMaker 11 Go To Related Record Weirdness

Discussion created by ChrisVanBuren on May 16, 2014
Latest reply on May 16, 2014 by ChrisVanBuren

Here's weird for you.

 

In the snippet of script below, there are two GTRRs. I believe that both are working fine (I get records and I get the layout change).

 

First GTRR ALWAYS throws an error 101. Second GTRR works properly. I have disabled the error check on the first GTRR as a result just to make it work.

 

FYI, for those not aware of what GTRR is supposed to do when there are no records, here is an explanation: http://sixfriedrice.com/wp/detecting-related-records/

 

This is FMPA 11.0v4 on Mac Mavericks.

 

Note that I have deleted and recreated the first GTRR. This made no change in behaviour.

 

#

#BIZARRE - throw error 101 even when there are related records. Just ignoring for now.

Go to Related Record [ From table: “g_MEMA”; Using layout: “MEMA” (MEMA) ]

[ Show only related records; Match found set ]

// If [ not Get(LastError) = 0 ]

// Show Custom Dialog [ Message: "No attendance records found."; Buttons: “OK” ]

// Close Window [ Current Window ]

// Exit Script [ ]

// End If

#

Enter Find Mode [ ]

Set Field [ MEMA::z_attendanceMark1or0_n; 1 ]

Set Field [ MEMA::AttendanceDate; ReportsHome::zg_startDate_d & "..." & ReportsHome::zg_endDate_d ]

Constrain Found Set [ ]

If [ not Get(LastError) = 0 ]

Show Custom Dialog [ Message: "No attendance records found."; Buttons: “OK” ]

Close Window [ Current Window ]

Exit Script [ ]

End If

#

Go to Related Record [ From table: “mema_MEM”; Using layout: “Unique Attending Members Report” (MEM) ]

[ Show only related records; Match found set ]

If [ not Get(LastError) = 0 ]

Show Custom Dialog [ Message: "No members found."; Buttons: “OK” ]

Close Window [ Current Window ]

Exit Script [ ]

End If

#

#

Outcomes