AnsweredAssumed Answered

Build a list of matching child records (with a parent record header for identification)

Question asked by MorkAfur on Jun 18, 2012
Latest reply on Jun 20, 2012 by philmodjunk

Title

Build a list of matching child records (with a parent record header for identification)

Post

Say you have a database of vendors with a child table called appointments.

I would like to build a layout where I can enter a search term and have it list on some layout, the vendor name and all the matching child records with that search term. That way, I could see a list of all the matching search term in all the child records for all vendors on one layout.

For example,

Say you were looking for the term "Dehumidifier". You know you'd purchsed one from a couple vendors. Yet, there would be too many child records to do a regular interactive Find. This find needs to be done programmatically so I can extract just the right child records (with the search term) and the parent record saying who the vendor is.

Not sure how best to do this in FMP 12.

Using SQL, it would be like this:

Select vendor.name, appoinment.details
   where vendor.ven_pk = appointment.ven_FK
       and
    appointment.details LIKE '%Dehumidifer%'

Look forward to hearing suggestions.

-m

Outcomes