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.

Multiple relationships into the one record

Featured Replies

Ok I'll try and explain this as best as I can...

I'm creating a card game within fmp7 and I have one table for the main game (game) and one for the deck (card_pics) and I've got it all set up to create card ID's for each card in "card_pics".

I also have a random card generator in "game" that deals out 3 cards. Now I wanted the ID produced by the generator to be related to the Card_ID from "card_pics" so that you could actually see the cards. I got it to work for one card but when I try to relate the other two card ID's (in game) to "Card_ID" (in card_pics) it just shows me the same card 3 times...

i can't figure out why this is doing what it is..

if anyone can shed some light that'd be great

also if you need any more info just ask

if you have 3 cardID fields in game, then you need 3 relationships to the deck, one for each cardID.

Or you create 3 records, one record per card delt. Then you only need one relationship from the sole cardID in the "card delt" record to the cardID in deck

  • 2 weeks later...
  • Author

ok.....i've restructured my game a bit. i now have separate tables for the players hands, the draw deck, the discard pile, and the played cards...but i'm only focusing on the players hand at the moment. oh and the game is "shithead" also known as 'palace' or 'karma'.

This is my problem now:

1. I've set up a script that selects 3 cards from 'deck' and places them into 3 separate records in 'p1_hand'.

2. I have 3 container fields in 'game' to hold the pictures from 'deck'

3. I have a relationship between 'deck' and 'p1_hand' that pulls the related image into a container field in 'p1_hand'

4. What I need is a relationship to pull the card images from the 3 records in 'p1_hand' into the 3 container fields in 'game'.

hope that made sense

I don't know much about card games, but it seems to me a card can be only at one place at a time. So if there was a field Location in the Cards table, holding the card's present location (draw deck/discard pile/player X hand, etc..), you would only need a relationship for each location. The card picture can be stored in a container in the Cards table, and shown directly in the portal for the relevant location.

Create an account or sign in to comment

Important Information

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

Account

Navigation

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.