Path: csiph.com!aioe.org!.POSTED!not-for-mail From: Helpful Harry Newsgroups: comp.databases.filemaker Subject: Re: Linked Record in Layout Date: Mon, 08 Feb 2016 16:58:52 +1300 Organization: Aioe.org NNTP Server Lines: 51 Message-ID: <080220161658523104%HelpfulHarry@BusyWorking.com> References: <1mi8zn4.1i2u3kg1qpwdk2N%csampson@inetworld.net> <080220161652451040%HelpfulHarry@BusyWorking.com> NNTP-Posting-Host: PK01p1B0Fv5gnC1N+nqpHQ.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Complaints-To: abuse@aioe.org User-Agent: Thoth/1.8.4 (Carbon/OS X) X-Face: vIZzK[X\z-._]-_:U?l@cBtwg<{a>ggn\mH}Vs>38E,#R%7h%U0'=4;1Q=erO %[T#a{YJfGvAbWmE@f_h], Helpful Harry wrote: > In article <1mi8zn4.1i2u3kg1qpwdk2N%csampson@inetworld.net>, Charles H. > Sampson wrote: > > > > When I was learning the FileMaker way of doing things, I created a > > number of layouts in which a "regular" field showed data from a related > > table. That is, without benefit of a portal. > > > > By and large, this has worked as I wanted it to. I'm currently having > > trouble with one such layout. Before I describe that problem > > specifically, I'd like to get information about this approach in > > general. When is this way of doing things acceptable and when should > > portals be used? I realize that the answers to these questions might be > > "never" and "always". > > As always, it will depend on what you are trying to achieve and why. > > A Portal is usually used to show data from multiple related records on > the layout for the Parent record. It's usually not a good idea to use > Portals on print / Preview layouts, but instead print from a layout for > the Child records (using a backwards Relationship link to obtain Parent > record data if needed). > > Putting a single related field onto a Parent record layout will only > ever display the data for the FIRST related record (which record is > "first" will depend on the sort order for the Relationship). > > You can of course use also use a single calculated or Summary fields in > the Parent record table to do things like Sum or Average all related > Child record data via the Relationship link. > e.g. RelatedAverage = Average(Relationship::ChildNumberField) Sorry, I meant to say that a calculated field in the Parent record that does not use of the aggregation functions (i.e. Sum, Average, etc.) will also return data from the first related record. For example, a Calclation field in the Parent record that is defined as: ChildAdd = Relationship::FieldA + Relationship::FieldB will only calculate the result using the first related record's FieldA and FieldB data. If you want it to be a total of all the related records' FieldA and FieldB data, then it needs to be something like: ChildAdd = Sum(Relationship::FieldA) + Sum(Relationship::FieldB) Helpful Harry :o)