Skip 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.

Multiple related records in a merge field

Featured Replies

I have a FM system for reserving multiple calendar days for a single workshop. I would like to generate one field that displays the title of the class as well as all the associated dates, this way I can insert that total value into an email body field and send workshop reminders. It should look like this:

Workshop 1

Jan 2, 2002

Jan 8, 2002

Jan 12, 2002

I can generate portals, I can do complicated copy and paste scripts to get it all, but I there just has to be a simpler way. Any thoughts?

Thanks so much!

If you had 8.5 or greater you could use the list function. Assuming the class name field is ClassName:

List( ClassName; list(ClassDates::Date))

And if you're unwilling to update to FMP 9, there should be some custom functions floating around on this site which make use of GetNthRecord to emulate the List() function... hmm, why not try this one: http://www.briandunning.com/cf/439.

Concatenate the class title with the output of this function and use the result as body of your e-mail, either in a new calculation field or by using a script and a variable. Good luck!

Cheers,

eos

Edited by Guest

But since you have 8 Advanced, you can a use a custom function to achieve the same thing - see here:

http://www.fmforums.com/forum/showpost.php?post/267809/

Although that thread deals with a found set, the function will work just as well with a related set, if a reference to a related field is placed in the fieldName parameter.

  • 2 months later...
  • Author

I upgraded to FM9 and need a little syntax help with this list function. I'm generating email bodies that include a list of dates, times and channels that programs play on.

In a wierd kind of shorthand, I need to display three fields per row, like this:

Sunday, 3PM on Channel 9

Monday, 2PM on Channel 10

Tuesday, 6PM on Channel 22

etc

However when I try to List(""&date&""&time&""&channel&"") then I get a message that basically says I should not use an expression when a field would suffice. Well la-di-da, thats fancy Filemaker language for "you don't know what you're doing".

And so I am here. Anyone have thoughts?

You need a calculation field in the related table =

date & " " & time & " " & channel

Then use the List() function with this calculation field as the parameter.

  • Author

Ok, got it. My list is appearing as intended, almost.

I made field called schedule_summary:

""&Timestamp ( date ; time)&" on Channel "&channel&""

and got:

2/22/2008 9:00 AM on Channel 10

And this is perfect, but the List(schedule_summary) does not sort the records/rows in a logical order. How can I force the resulting list of records to go in chrono order and not random?

  • Author

Nevermind, I finally found the answer after distinguishing between Value List and List(Function) in my searches.

I had to use the relationship sort order to get the List(schedule_summary) to display in chrono order - and either make a separate relationship for my needs or display any future portal with a different portal sort order than the relationship I used for the list.

The answer was here:

http://www.fmforums.com/forum/showpost.php?post/272183/

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.