Creating a tool to manage scorekeeping for Fantasy Survivor League

Hey all,

My friends and I are fans of Survivor and we run an Fantasy Draft each year. I’m working on a tool that will help manage weekly scoring.

High level, what I envision:

A place to see overall contestant and fantasy team points, updated view of which contestants are still in the game, etc

Team Selection tool
Allow players to choose their fantasy tribe members and denote one their “Power Player”

Commissioner Page
A tool that allows the Commissioner to quickly score the points for each week

Here’s what I’ve built so far:

Where I need help, please

  1. Am I on the right track? Are there early things you’d change to get better results?

  2. Commissioner Page Buttons - I have a vague idea of the commissioner using a dropdown to select the week, then utilizing the buttons to allocate points to each contestant. I can’t get any of these to work right now.

  3. Player Team Points: The blocker I see in the distance is, after the commissioner clicks the button, how to appropriately give a Power Player 2x points if the Contestant is the PP for a Player’s Team.

Nice! I think you’re on the right track, though there are a couple things that give me pause.

There are a couple of situations where you’re leaning heavily on columns in a way that feels correct in the world of spreadsheets, but less-optimal for Coda (which is a bit more in the world of databases):

  • column per week in the scoring table
  • column per choosable character slot

These design choices aren’t the end of the world. Their main drawbacks are:

  • They don’t scale well (but you don’t care, cause you know already exactly how long the season is for example)
  • They make for long, tedious formulas (someone’s score is Week1+Week2+Week3+...)

I would say, it’s perfectly reasonable to continue on your current path; it should work fine for you in this situation (and has the benefits of seeing things in a spreadsheet layout, e.g. everyone’s points for each week, which you probably want).

Buttttttttttt if you want to build it in more Coda-y way (a more Nick-y way? but I think a Coda-y way haha), whose patterns will serve you well in future docs that are more complex / dynamic…

Aim to use tables and filtering rather than hard-coding columns

I actually helped someone else earlier today with a similar situation - this might be a good read to see what I mean. But basically the idea is that you create tables for things like transactions, or connections between people and contestants.

Let’s look at the contestant points. Instead of having a column per week, my instinct would be just to have a table of Weeks, and then a Points table with 3 columns: Contestant, Week, Points. While not as ideal from a visual perspective, the data is easier to work with in formulas (you can also group that table by weeks which helps a bit).

The benefit of structuring things this way is it’s easier to slice the data in different ways:

  • Points.Filter(Contestant=Brando).Sum() for all of Brandon’s points

Or more abstractly, in the Contestants table you could have columns for

  • contestant’s total points: Points.Filter(Contestant=thisRow).Points.Sum()
  • or contestant’s point history: Points.Filter(Contestant=thisRow)
    • This one is great for showing as a subtable in a detail view of a contestant

This architecture lets you arbitrarily add new weeks as needed without changing any formulas (which again, I know you don’t need here, but in theory it’s nice haha)

And if you move all a user’s picks into a single column, you can do things like Points.Filter(MyPicks.Contains(Contestant)).Points.Sum() for a total of all the points of all your picks.

Back to your original questions!

  1. This is kind of answered above, though again, I think you can get by with what you have because of the well-defined, static nature of the problem space here.

  2. If you go with my architecture, you can select a week from the dropdown, and then those buttons will be like

  Week, [WeekToEditDropdown],
  Contestant, thisRow,
  Points, 3
  1. Sometimes the value a user derives from a contestant is more than the contestant derives and we need to account for this somewhere. Does the Power Player change each week? If not, you could hard-code a user’s point total with like Picks.Points.Sum() + PowerPlayer.Points (I forget the exact rules - maybe it’s only certain kinds of points that you get bonused on, so like PowerPlayer.Points.Filter(type="immunity"), if you were to add a points type column to the points table).

WOW, Nick! This is all extremely helpful.

You’re very right. I’m stuck in spreadsheet brain and need to get more Coda-fied.


1 Like

Already making progress! This is starting to feel like a real Coda doc!

Contestant Scoring

  • Scoring buttons: These work correctly now, adding new rows to the Points table just below. (Any concern that this will create an enormous table? I will probably just hide it?)

  • Tribe Quick Scoring: I’ve set these up with If statements and they don’t seem to work? They don’t kick out an error, but they don’t add rows to the scoring.

If([Contestant Scoring].Tribe=Reba, RunActions([Contestant Scoring].[Reward Challenge]), "")
  • Eliminated Button: I can’t get this to work. The idea is that if the commissioner clicks it, the Tribe column in the Contestants table will add the “Eliminated” tribe. (Ideally we can keep two tribe assignments, for posterity)

Next goals:

Team Selection dashboard:
Rather than have a bunch of dropdowns in that table, I’m thinking of creating a view of Contestants that:

  • Has a dropdown for the Player (I know I could have people login to access this and make use of the People functionality, but I don’t want to do that quite yet.)
  • Create a button for Players to click to add someone to their team
  • Create a button to D

Updates! Things are working! Now to get the scores going!

TL;DR - I need help figuring out how to get scoring tables to work correctly.

Basic Architecture

I reorganized and created a few new tables to make it more end-user friendly.

Dashboard: This is where all the weekly/overall progress charts will go.

Team Selection: A view of the Contestants table, with some buttons to allow players to add contestants and designate their Power Player

Data: The guts of this doc!

Contestant Scoring

What works:

  • Scoring Buttons: These all work!
  • Tribe Quick Scoring: These all work! Here’s what I did:
[Contestant Scoring].Filter(Tribe.ContainsOnly(Reba)).[Reward Challenge])

What doesn’t:

  • Any Scoring Tables: I built a few subtables to help sort/collate the points as they get generated by the Scoring Dashboard. I’ll revisit @Nick_HE 's advice on the original reply and see how things develop.

  • Eliminated Button: Still doesn’t work. This is what I’m trying:

ModifyRows(Filter(Contestants, [Contestant Name] = thisRow.Contestant ), Contestants.Tribe, Eliminated)


I’ve been trying to get the Scoring Buttons to run multiple actions and adding points to the Player PointsTable and Contestant Points Table simultaneously.

This code continues to work to add to the Contestant Points (ConPtLog), but I’m stuck on the Player Points part:

// First Action: Add Row to ConPtLog
AddRow(ConPtLog, ConPtLog.Week, [Week Select],
  ConPtLog.Contestant, thisRow,
  ConPtLog.ContestantPoints, 1
//Second Action: Update Player Points
  [Player Teams].Filter([Team Roster].Contains(thisRow)).FormulaMap(
      [Player Points], 
      [Player Points].Name, CurrentValue.Name,
      [Player Points].Week, [Week Select],
      [Player Points].Points, 1

What I think it should do is add the Contestant Points, then filter the Team Roster to see if there’s a Contestant Match. If there is, it will add a row with the Player Name, Week, and Points.

We are SO CLOSE. I only have one thing left to figure out for me to feel confident in this being a v1 for this season.

The “Add As Power Player” button!

If([Power Players].Name.Find([Player Select]) = -1, // If the player's name doesn't exist in the table
    [Power Players], 
    [Power Players].Name, [Player Select], 
    [Power Players].[PP Contestants], thisRow.[Contestant Name]
  ), ModifyRows(
    thisRow.[Power Players].Filter(Name = [Player Select]),
    thisRow.[Power Players], thisRow.[Contestant Name]

That’s my code, and it’s not working. I click it, the button spins, and it doesn’t do anything. No error code from Coda or anything.

Any ideas?

Closing the loop here!

With Season 45 starting on Thursday, we’re going to move forward with the tool as is.

Here’s a template for you!