[FX.php List] Getting a Related record ID
Malcolm Fitzgerald
malcolm at notyourhomework.net
Mon Jan 16 16:13:35 MST 2012
Yes, I can do that. I hoped for a built in method that would give me the record ids of the related records.
My plan A looks like this:
I have two tables Contacts and Addresses
Search Addresses for a postcode
Loop through results to build a new search request directed at Contacts
Search Contacts for all IDs found by postcode search
Loop through results to create a table of links to the contacts records
Display for edification of user
Plan B is:
create an unstored calc field in Contacts to generate the FX record id, ie, Get ( RecordID ) & "." & Get ( RecordModificationCount ) and place it on the Addresses layout.
Search Addresses for a postcode
Loop through results to create a table of links to the contacts records
Display for edification of user
Plan B seems to be simpler and it reduces the amount of calls to and from the database.
It uses unstored calculations so any request requires that data to be generated which is slow
Search results are small, about two dozen at most.
Malcolm
On 17/01/2012, at 12:31 AM, BEVERLY VOTH wrote:
> Malcolm, since you have a record, why not search for related using the key/match field(s)? I use this all the time. If you have a "filter" on the portal, you can even include that in your find for related records. I don't use the -recid, as that's not what's used to "match".
>
> Beverl
>
> On 16 Jan 2012, at 1:42 AM, Malcolm Fitzgerald wrote:
>
>> Table "A" and table "B" have a one to one relationship. When I search on table "A" I would like to obtain the record ID from the related record in table "B". Is there a sneaky way to obtain the IDs or do I have to loop through my found set.
>>
>> What I would like to do is very similar to Filemaker's built-in Go to Related Records command. Having obtained a found set in one table I want to go to the related record set in another table.
>>
>> Malcolm_______________________________________________
>> FX.php_List mailing list
>> FX.php_List at mail.iviking.org
>> http://www.iviking.org/mailman/listinfo/fx.php_list
>
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
More information about the FX.php_List
mailing list