8 Replies Latest reply on Feb 11, 2014 10:08 AM by quirkycrone

    Getting right RecordID from Portal???

    quirkycrone

      Title

      Getting right RecordID from Portal???

      Post

           I have a problem with a one (client) to many (residences) relationship that I am endeavoring to show in a tab on the page where I enter New Contacts.

           Even though the Portal in the tab Additional is on CLHomes (a table related to Contacts by CLID) when I trigger a script to capture the recordID from within a portal row, the recordID which is captured seems to be the recordID for Contacts.  When I set the HomeID to be the same as my capture I don't show any of the related info for the portal row outside of the portal on the tab for Other Addresses.

           I have read through many other posts on  portals and connecting the table in the portal to a copy in order to use the copy to display the particular expanded data from a selected portal and I can't seem to digest how this is done (probably because I am confused about how records are related because, unlike Access, there is no way to easily "see" RecordID or Go To it for that matter).

           So, I am thinking maybe if you can check out this script you can tell me where I am going wrong.

      Screenshot_2014-02-07_11.19.09.png

        • 1. Re: Getting right RecordID from Portal???
          quirkycrone

               Since I can't figure out how to add to this post I am sending a "reply"  Primarily I wanted to show you another screen capture so that you can see the script context.  The script runs OnEnter of the first field of the portal row in CLHomes  (home_qualifier).

          • 2. Re: Getting right RecordID from Portal???
            philmodjunk

                 I would not use the Get ( RecordID ) function for this. This function returns an internal serial Id value from the current record. This is not the CLID that you have defined in your relationship.

            • 3. Re: Getting right RecordID from Portal???
              quirkycrone

                   Nope, the CLID I used to relate Contacts to CLHomes is a unique contact identifier.  I am trying to get a record reference for the table CLHomes so that I can synch the portal record when I make that portal row active and can show additional data from CLHomes.

                   Oh I'm using Pro 12 on a Win 7 machine.

              • 4. Re: Getting right RecordID from Portal???
                philmodjunk

                     And I repeat. I would not use Get ( RecordID ) for this.

                     

                          I am trying to get a record reference for the table CLHomes so that I can synch the portal record when I make that portal row active and can show additional data from CLHomes.

                     Then it should be possible to access a field set up as the primary key in your CLHomes table, though I am not at all clear as what you mean by "synch" in this context. My best guess is that you want a mouse click on a button in the portal row to select that record so that you can reference fields in that specific CLHomes record.

                • 5. Re: Getting right RecordID from Portal???
                  quirkycrone

                       I'm somewhat perplexed by your response.  How does one set up a primary key in a table?  I know that sounds silly, but in Access you specify a primary key.  In filemaker it seems to develop from the relationships you set.  At any rate, I did try to create a self-join by connecting CLHomes 2 to CLHomes by making CLID and Home-qualified match fields on the relationship graph. since this would be unique, unlike CLID alone. No dice.  Sure I've got CLID, but in this instance of got three match CLIDs because I have added 3 residences for this client. So that doesn't help me find the particular CLHomes record I am trying to "synch" or bring up with the portal record I am selecting.  All I get is the first record.  That seems to be what everyone has said.

                       Looking at various similar problems posed by others you were often telling them to create another instance of the table and use a RecordID to locate the matching record on the second instance of the table.That's basically what I have been trying to do, but I could not make sense out of your suggestions. I worry that if you duplicate a table and give it another name then the tables won't be the same anymore.It seems I would have to add a new record every time I added a new residence to the portal.

                       So, I'm stumped.

                  • 6. Re: Getting right RecordID from Portal???
                    quirkycrone

                         Here's one of the queries I was looking at and not understanding your response.

                    "Using a tab to display associated records from linked tableAnswered"
                    • 7. Re: Getting right RecordID from Portal???
                      quirkycrone

                           And I am still stumped...so I posted on another post since this one was getting any action...

                      • 8. Re: Getting right RecordID from Portal???
                        quirkycrone

                             Well I got my answer!!! A colleague found this post, very informative, on PRIMARY KEYS.  Phil, you might want to refer someone else with an Access background to this post. http://forums.filemaker.com/groups/80a7e0f9d5/summary?lang=en_US  It explains that Primary Key (or whatever you are using for a self join  it seems) must be an auto-entered serial number..remember this one?  "Meaningless data?"

                             So FM doesn't like to find meaningful data, like a text match, in a self join.

                             Once I changed the ID field to number everything works....IT CAN BE DONE!  Once you create a RECORD NO by workaraound.  Access comes with  these built in.