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.

Compare multiple fields

Featured Replies

Hi,

I have 2 tables

Courses table with unique Course_ID

and

Teachers table with

1.) a combined field with all Course_IDs separated by comma

Course1_ID, Course2_ID, Course3_ID

2.) Individual fields for every Course related:

Course1_ID

Course2_ID

Course3_ID

What is the best method to find all matching Courses for any Teacher?

I can compare one field but that does not give me the other Courses...

I need some basic advice on how to proceed...

Thank you

Cheers

Lars

How many teachers can teach the same course?

  • Author

There can be up to 10 teachers...

If more than one teacher can teach the same course, you should have three tables: Teachers, Courses and a join table for assigning teachers to courses (and vice versa).

See a basic demo here:

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

  • Author

Thanks, I have basic understanding of a join table (from sql) but how do I handle this in Filemaker. How do I create it etc.?

Just a basic method pointing me in the right direction...

Maybe I can avoid the join table, since I have the information stored in the 2 tables already (distributed across different fields though)

Thanks again...

Edited by Guest

how do I handle this in Filemaker

That's what the demo shows?

I have the information stored in the 2 tables already (distributed across different fields though)

You do - but as you have found out, it's not very usable.

  • Author

Since the data is provided "as-is", I don't want to create any new join-tables.

Would it be feasible to make a script that gradually narrows down the search:

1. Search for Courses that have Course_ID = Teachers::Course1_ID

2. Search for Courses that have Course_ID = Teachers::Course2_ID

3. Search for Courses that have Course_ID = Teachers::Course3_ID

4. Search for Courses that have Course_ID = Teachers::Course4_ID

etc.?

Any advice on this?

Thnaks again...

Cheers

Lars

It would be even more feasible to define a calculation field (result is Text) =

List (

Course1_ID ;

Course2_ID ;

Course3_ID ;

...

Course10_ID

)

and search there.

In addition, if you define a relationship matching this calculation field with the CourseID in Courses, you can place a portal to Teachers on a layout of Courses (and vice versa) and/or use Go to Related Record[] to show all teachers of a course, or all courses of a teacher.

However, you will still be limited in many aspects with this structure - so the question is how often is this data provided and how do you intend to use it. Once you create the proper structure, the process of importing the given data can be automated (basically, you do 10 imports, each time importing the TeacherID and one of the 10 columns).

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.