Building correct data structure

Thanks in advance…

I’m retired and have a few interests to keep me busy. One is learning how to program and another is golf. This request merges both.

As a golf nerd I like to capture performance details for each hole. I have a Sheets SS that captures 10-12 attributes about each hole (items like Drive Distance, Number of Putts etc).

I’d like to use Glide on my mobile where I’d open Glide - define the course I’m playing, then open to a hole number and then for each performance attribute be able to pick from 3-4 options offered by the app (options for # of putts might be 1,2,3,4). I prefer the options approach since this eliminates invalid entries and speeds up the entry activity in general.

I tried the direct conversion from Sheets to Glide and it did not build the structure correctly in Glide.

I then tried doing so directly in Glide and also failed.

Here’s the hierarchy.

Course (select from a list) > Hole # (select from 1 - 18) > Attribute (select from up to 12) > Attribute choice (max 5 options).

I can manipulate the resulting SS table - in whatever form it takes - without much difficulty.

I looked at a fair number of other Glide solutions and none seemed to do what I wanted and when I saw some slivers of data structure that did appear to be close (typically material management ones), I couldn’t decompose how they were accomplished.

Can someone help?

Again, thanks in advance.

I’m also a golf nut, and building a scoring app is on my to-do list…

Here’s a few ideas.

  • I’d have one sheet dedicated for courses
    • Course name, location, etc
    • You can take advantage of array columns for the hole pars and indexes. So for example, you could create 18 columns named “Par 1, Par 2, Par 3 thru to Par 18”, and use those to hold the par for each hole. And then do the same thing for the hole indexes (“Index 1, Index 2, Index 3, etc”)
  • Have another table for your Users (even if it’s only you to start with)
  • And then a 3rd table for your rounds, where each round will occupy one row

This is where you need to decide if you want to record hole by hole scores (and performance attributes), or just a total for each round. Either way, I’d probably keep the performance attributes in the same table as the rounds. Let’s assume you want to score hole by hole, for both gross score and each of your performance attributes. Again, I think I’d use array columns. So you might have:

  • Score 1 to Score 18
  • Putts 1 to Putts 18
  • GIR 1 to GIR 18
  • Fairways 1 to Fairways 18
  • etc, etc…

It’ll be a lot of columns in your Google Sheet, but Glide will convert each set of 18 into a single array column, which makes them relatively easy to deal with.

In terms of UI:

  • You can use a choice component for selecting the course
  • Once you select the course, it would probably make sense to create a new row in your rounds sheet (Add Row action), with the course name (or ID) and the date. Then once you start entering your hole by hole scores and stats, you’d be doing a Set Columns action on that row.
  • You can use a choice component for selecting the current hole
  • And for your score and other stats use whichever input components make the most sense. For things like GIR or Fairway hit (where it’s true/false), then use either a Switch or Checkbox. For putts, where it’s generally in the range 0-4, then a choice component in segmented mode would be a good choice.

Anyway, there’s a few ideas which hopefully help you get started. To be honest, I haven’t really thought too much about this - all of that was pretty much off the top of my head. So there could be a much better way to approach this…

Feel free to reach out for help as you progress. I’ll be following with interest :slightly_smiling_face:

3 Likes

Darren,

So the entries for performance would be done at the conclusion of each hole (retired = poor memory etc etc).

So you’d finish a hole, open the app and select your score (ie 2,3,4,5,6,7, or the dreaded snowman 8), then the app would toggle to each attribute where you’d make the selection.

I’d be happy to share the entire SS and App as its built out. Currently in Sheets, I have a SS that takes HxH scores, and adjusts for Esc, posts the total score and resets your handicap. Pretty much a combo of typical SS as well as some Google Script.

Goal is initially to have this just for me (few others would post all the attribute detail), but I’d eventually share it with my golf group (s).

My challenge today is I only got exposed to Glide 5 days ago and the structure got me down… :frowning:

I’ll look into your ideas and see if it gets me further along.

Thanks.

Would you like to collaborate on the app?