April 17, 200817 yr I want to grab all related records into a calculation. In theory I could do this with a repeating field by having MyStuff = Repeating[1] & Repeating[2] & ... Related records are much more elegant but I can't get it to work. Interestingly, the following works for the first and last related record Mystuff = Tbl::Field & Last(Tbl::Field) But the following doesn't work Mystuff = Tbl::Field[1] & Tbl::Field[2] & ... (neither does Mystuff = GetRepetition(Tbl::Field,1) & GetRepetition(Tbl::Field,2) & ... ) Ultimately I want this information printed out, but I've got multiple fields in the related record and multiple relationships and I want to display this information in multi columns and in order to have sliding portals show the data they have to be so large they don't fit in a single page's column.
April 17, 200817 yr The best way to do this in my (limited) opinion is to use the Custom Function, GetRows (and its companion GetNthRow), which is available at: http://www.briandunning.com/filemaker-custom-functions/list.php It would allow you to create a calculation field which returned a return-separated, tab-delimited list of the related records. The calculation can then be placed on the layout as a Merge field, which should break properly over page breaks. But it requires FileMaker Pro Advanced, to install the CF (any version of FileMaker can then use the CF). There is also the List() function, which can produce a return-separated list for a single related field. Conceivably you could line up several of these to produce the same as above. But you'd have to make sure you had no blanks in any field, as the lists would then not line up properly. Another way to achieve the same thing would be to go to a dedicated layout of the related table, via the portal's relationship. Then use the Copy All Records command to put the fields on the clipboard. Go back to the parent record, to a layout, and paste into a field. Since this in really only for printing, that field could be a global field. Otherwise it's going to bloat the file for little reason. Edited April 17, 200817 yr by Guest
Create an account or sign in to comment