searching over many relationships

I have three tables A,B and C. Tables A and C are related through B.

My find method needs to be able to search fields from A, B and C simultaneously.

In my find method I would like to be able to domething like:

forms.A.controller.find();

forms.A.fielda = sometexta;

forms.A.A_to_B.fieldb = sometextb;

forms.A.A_to_B.B_to_C.fieldc = sometextc; // this is the one I cant do!

forms.A.controller.search();

Is there a way to do this?

Thanks, any alternative suggestions on how this should be done would be appreciated.

The SQL Generator for searches does currenly only support multiple one level deep relationships, if you want to do more complex searches you need to create the SQL yourselfs.
See the sample code from controller.loadRecords(…) or check the docuementation for that function, for how to pass SQL of PKids to a form

OK thanks for that.

So is it possible to combine several custom PKids into one large dataset to be loaded into a form?

yes, see documentation