Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 6123 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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.

Posted (edited)

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 by Guest

This topic is 6123 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.