Boulder Creek
Operations
Setup · one time, about five minutes

Turn On Saving

The Booking Desk can already read the Sheet. This adds the piece that lets it write back, so nobody has to open the spreadsheet to change a booking.

Who does this: Roger, once, on the Boulder events Google account. After that it just works for everyone using the Desk, and never needs doing again unless the script changes.

Before you start

The five steps

  1. Open the Booking Sheet, then open its script

    In the Sheet's menu bar, click Extensions then Apps Script. A new tab opens with the code editor.

    You should seeA page titled Apps Script with a file called Code.gs in the left sidebar, and code already in it. That existing code is what feeds the board. Do not delete any of it.
  2. Scroll to the very bottom of Code.gs

    Click once inside the code, then press Cmd + End to jump to the end. Put your cursor on a new empty line below everything.

    Why the bottomThe new code is a separate function. Pasting it in the middle would land inside an existing one and break the board.
  3. Paste the new code, then save

    Paste, then press Cmd + S. The tab title stops showing a dot when it has saved.

    You should seeA function called doPost at the bottom, and no red error marks in the left margin. If you see a red mark, you probably pasted inside another function. Undo and try step 2 again.
  4. Deploy it as a new version

    This is the step that actually turns it on, and it is the one people miss. Saving the file is not enough. Google keeps serving the old code until you publish a new version.

    Top right, click Deploy then Manage deployments. On the existing deployment, click the pencil icon at the top right of the panel. In the Version dropdown choose New version. Then click Deploy.

    The two traps1. Using "New deployment" instead of the pencil. That creates a second web address, and the board and Desk are pointed at the first one. 2. Leaving Version set to the existing number. It has to say New version, or nothing changes.
    How to tell it workedOpen the connection check. It tells you in one line whether saving is on.
  5. Check the two settings, then finish

    In that same dialog, Execute as must be Me, and Who has access must be Anyone. Click Deploy, then Done.

    Why "Anyone"It means anyone can reach the address, not that anyone can do anything. The script only accepts a small set of columns, refuses to overwrite work someone else just did, and writes every change to a log. Without this setting, Google demands a login and the Desk cannot read or write at all.

Check that it worked

If saving fails. The message on screen tells you which of these it is.
What keeps this safe, since everyone can save. There is no password to hand out, on purpose. Three things do the protecting instead. The script can only write a fixed list of columns, so it can never delete a row, rename an id, or touch the Units tab. It refuses a save when someone else has changed the same cell since you loaded, so two people cannot quietly overwrite each other. And every write is recorded in the Changes tab with a name against it, so anything wrong can be found and put back.
The code: setup/Code-write.gs. Related: connecting the Sheet to the board and the Sheet itself.