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.

Getting field values from related table

Featured Replies

  • Newbies

Hi

My first question. (I'm really a filemaker newbie) and searched the forum/internet so please be nice).

I have the following setup in Filemaker 10.

Table1 with: id_table1, related_names

Table2 with: id_table2, name, include

and a joint-table with: id_table1, id_table2

Now I want either make related_names a calculated field or write a script that sets related_names to a comma separated list of all names which are connected through the joint-table and have Table2.include = True.

So for example a data set could look like:

Table1

id_table1, related_names

1, "foo,bar"

2, "foo"

3, ""

joint-table

id_table1, id_table2

1,1

1,2

1,3

2,1

Table2

id_table2, name, include

1, foo, True

2, bar, True

3, baz, False

After searching the internet for a few hours the closest I came was a calculated field with list(join-table::id_table2) which gives me a list with a all the id_table2's. But now I would need to find the appropriate records in table2 and check the include field.

I hope the problem is clear. any help is highly appreciated.

If I understand correctly (it's a bit too abstract to follow), you could add a calculation field to Table 2 =

Case ( Include ; Name )

Then in Table 1 calculate =

Substitute ( List ( Table 2::) calcField ) ; ¶ ; ", " )

  • Author
  • Newbies

Thank you for your fast reply. Ok I can see how to use the substitute command, and also the additional calculated field in table2.

But how do I have to use the joint-table to get all corresponding entries for a record in table1?

in my example the record 1 in table1 has three entires in table2 (namely the entires with id 1 or 2 or 3)

I am afraid I don't understand your question.

Thank you for your fast reply. Ok I can see how to use the substitute command, and also the additional calculated field in table2.

But how do I have to use the joint-table to get all corresponding entries for a record in table1?

in my example the record 1 in table1 has three entires in table2 (namely the entires with id 1 or 2 or 3)

You were given the complete answer to the question.

What happened when you tried it?

Please post an example file.

Tried it?

I'm waiting for comment to post the worked solution. :)

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.