1 Reply Latest reply on Jun 1, 2009 11:15 AM by philmodjunk

    Go to related record randomly not working in IWP

    tminogue

      Title

      Go to related record randomly not working in IWP

      Post


      <!-- GALLERYINCLUDE -->Help!
      I am having problems with a Filemaker 9 IWP dbase. I have a table called "Destinations" with a portal listing all records in the destination table. The user enters their password into a global field called "zpassword." This table is related to a "Comments" table by "Destination_ID" to "xDestination_ID" and "zpassword" to "xpassword". When a user clicks on a record in the portal it either creates a new related record for them in the "Comments" table (and takes them to that layout) or takes them to an existing related record. This has been working beautifully (~3600 records created without any problems) except for 5 specific times when a user clicked on a destination and rather then creating a new record in the comments table, they were directed to a random existing record with either or both wrong Destination_ID and xpassword.

      The script is as follows:

      If [Comments::DummyField="Yes"]
      Go to Related Record [Show only related records; From table"Comments"; Using layout:"Comments" (Comments)]
      Else
      Insert Text[Select; Comments::DummyField;"Yes"]
      Go to Field [Comments::Yes_no]
      Go to Related Record [Show only related records; From table"Comments"; Using layout:"Comments" (Comments)]
      End If


      Any ideas or suggestions?

      Thanks.








        • 1. Re: Go to related record randomly not working in IWP
          philmodjunk
            

          One Possibility is that there were no matching related records.

           

          An undocumented limitation of the Go to related record script step when used with a specified layout name, is that the script step will take you to the specified layout but will not modify the current found set if there are no matching related records. It's best to trap for that issue either by checking error codes or by using the count() function to count the number of related records.