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.

Relationships and Repeating fields?

Featured Replies

  • Newbies

Hello,

I have 2 databases. One is a recipe database with a related field called ingredients which relates to an ingredient database. The ingredients field is a repeating field that uses a value list from the Ingredient database. next to the Ingredient field is a repeating field containing the ID number from the Ingredient database. When I browse and check off the ingredients the ID field only shows the first ingredient Id.

I'm more than a little confused. Any help would be very appreciated.

Thanks a million

Alan

I realize this may not be the answer you're looking for... but, I recommend that you don't use repeating fields at all in this case.

In addition to the Recipe and Ingredient files, I suggest you create a third file that will help join the two together. Call it Join. You need this because you'll be establishing a many-to-many relation between Recipes and Ingredients (one recipe can have many ingredients, and simultaneously, one ingredient could be in many recipes). FMP cannot create a many-to-many relationship, so a join file is created to help bridge the gap. The Join table holds records for each instance of Recipe/Ingredient collaboration, functioning as a one-to-many bridge to both the Recipe and Ingredient at the same time.

From the Recipe file, create a portal to the Join file. Set up the portal so that you can create related records in it. In the Join file, add a field called IngredientName. Have that field show up in the Join portal on the Recipe file layout.

In the Recipe file layout, in the Join portal, format the Ingredient field to show a value list based on all the Ingredient records (in the Ingredient file).

Every time you add a new ingredient to a recipe, you are actually creating a new Join record.

This also helps out on the Ingredient end of things, because you never need to make duplicate records of ingredients, and you can from the Ingredient file see all the Recipes any ingredient is used in (with a portal from Ingredients to the Join file).

HTH

  • Author
  • Newbies

Thank you so much. I really appreciate your help Sharka. Things are starting to work now.

Alan

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.