Retrieving only specific fields

25 views
Skip to first unread message

David Koontz

unread,
Jan 17, 2014, 1:38:13 PM1/17/14
to rfmcom...@googlegroups.com
I feel like I'm missing something that should be obvious.  I want to get back all records that match a certain criteria, for example MyLayout.find("description" => param[:search]) but I only need 1 field off the result, not all of them (and for this layout there are many).  Is there a way to specify only the fields I want retrieved or to specify another model that is pointed at the same layout but only has access to the few fields I need for this operation?

wbr

unread,
Jan 17, 2014, 8:15:20 PM1/17/14
to rfmcom...@googlegroups.com
Filemaker always sends all fields on a layout, so to limit the fields returned you would have to point to a different layout that has only the fields you want. You can create as many Rfm model or layout objects as you want, all pointing to any available layout.

I usually create dedicated layouts specifically designed as remote access XML views into Filemaker. I don't use those layouts for anything else in Filemaker, and I only put the bare necessity of fields on those layouts. So I might have 2 or 3 layouts for a single table, depending on the complexity of the system and the number of fields in the table. Each of those layouts is accessed by a different Rfm layout or model object.

In the upcoming Rfm v3, I think you will have the ability to specify an alternate layout for a model on-the-fly (as an option in the find method).
Reply all
Reply to author
Forward
0 new messages