2 Replies Latest reply on Aug 14, 2015 6:15 PM by MarkBanin

    Pointing to the right record in a portal

    MarkBanin

      Title

      Pointing to the right record in a portal

      Post

      Windows 8.1    FM14  (Filemaker User for 4 months)

      I have an Employer table called "Family" (Parent), a Candidate table called "Au Pair" (Parent), A Interview table (Child) and a Documents table (Child)

      In the Employer table, I have a portal which shows the interviews lined up.  When I'm ready to Email the details and documents of the prospective Candidate. I press a button in the portal which exports the documents to a folder on my desktop and then prepares the details of the interview in an email (I then manually attach the exported files into email).  Now I can get the two parts working separately.  But when I try to put them together; the export works but It picks whichever is the first candidate in the portal for the email.

      What I'm struggling with is how to get it to point to the right candidate (Au Pair) so that the email fills in the right details.

      Any help would be greatly appreciated

      Script.JPG

        • 1. Re: Pointing to the right record in a portal
          philmodjunk

          You might consider using Go To related records instead of performing a find, but the scripted find is working OK. You might also consider searching for an ID number from the Au Pair table as you might get two candidates with the same name and then your current method will fail at times to find the correct Au Pair record.

          Your email pulls the first address because changing layouts loses the focus on the portal row clicked to start performing this script. What you can do is set a variable to the email as the second line of this script and then your send mail script step can refer to the variable for the email address instead of the email field. This can also be done for any other information you might need from the Au Pair table such as a name or phone number.

          • 2. Re: Pointing to the right record in a portal
            MarkBanin

            I don't know why I was making it so complicated by going through the portal.... The solution is much easier....

            1) At the top of the script, stored the Family and Au Pair ID's in a global Variable

            2) Created a layout for the Interview table

            3) Go to the layout and perform a find on both ID's

            And that's it! 

            btw, thanks for the thing about searching on Au Pair name to Au Pair ID - I changed that too.