1 Reply Latest reply on Sep 21, 2010 8:25 AM by FentonJones

# Simple Totals problem..????

### Title

Simple Totals problem..????

### Post

OK, what's the best approach to accomplish:

I have what should be a simple totaling problem.

I have the following tables: Team, League, Schedule, Schedule_Match

Team is a list of the teams in the league

League has the league parameters and has a 1-to-many link to the Team table (Teams in the League)

Schedule has a list of dates to play and a many-to-1 link to the League table

Schedule_Match has a list of the matches and a many-to-1 link to the Schedule record

-----------------------------------------------------------------------------------

In the Schedule_Match I enter #wins per team for that date/match

To keep track of the standings:

Should I create a separate Standings/Totals record and update with the wins from Sch_Match?

or

Keep the totals in the Team record?

or

??

It seems there should be a more efficient way to do this via a field calculation??

Thanks

Dan

• ###### 1. Re: Simple Totals problem..????

If you have a relationship from Team to Schedule_Match (likely), based on Team (id), then, yes, there could be a calculation field in Team.

I don't really understand the "#wins" field in Schedule_Match. It seems to me a team would only have 1 game per Schedule_Match, and they'd either win or not. In which case "Win_flag" would be a simple number field, Boolean (either 1 or nothing). If they have >1 game per "schedule_match", then you need another table.

A calculation field in Team, Number result, Storage, [x] Do not store (will automatically be checked; you cannot store data from relatedl fields).

Sum ( Schedule_Match::Win_flag )

This is only "looking" at the data in Schedule_Match; the data remains where it was entered (which is the safest structure, as it requires no maintenance).