Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 4305 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I have a table called "Teams" and a table called "Games". The games table has fields like "Home Team", "Away Team", "Date", "Away Score", "Home Score", etc. What I want is in the "Teams" table to have a portal that displays all games the team has played in. I can obviously get it to do that with it showing the home team, away team, and result fields, but what I want is something like this:
Say I was looking at the games for TeamA - I want an "opponent" field that says "@TeamB" if TeamA was away or "vs TeamB" if they were home. It would be great if I could have another field that says "W", "T" or "L" depending on the result. For whatever reason, I'm having issues figuring out how to do that.

Any help would be greatly appreciated!!

Posted

case(isEmpty(home team);"vs "& team; isEmpty(away team); "@ " & team)

 

As far as the W, T or L - this would depend on how you have scoring set up - if there is a calculation - scores are entered and calculated together to determine the winner - whatever the criteria is for winning, losing or tying, you can write another case calculation to give the W, T or L values. Or - you could have a drop-down list - W, T, L that would be entered when scores were entered to give the result of the match.

 

hth,

Martie 

Posted

I used a variation of that calculation for the "Opponent" field in the Games table:

Case(Away_Team_Name = T26_Games||Teams::Team_Name; "@ " & Home_Team_Name ; Home_Team_Name = T26_Games||Teams::Team_Name ; "vs "& Away_Team_Name)

 

I thought it was working great, until I realized it only worked for one of the teams. So if I go to Team A - I can see everything perfect, but if I go to Team B, it shows the same thing that showed up for Team A. Can't figure out how to fix that.

Posted

what is the relationship between the games table and the teams table?

 

you probably need two TOs - one for home teams and one for away teams.

 

M

This topic is 4305 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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