Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Grabbing Related Records Without a Portal

Featured Replies

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.

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

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.