My Objective & Approach
My objective for participating in the Packathon was to become more familiar with the pack building tools documented in the SDK and the JavaScript coding language. I had already dabbled in pack building using an API with the travelbriefing app, and since then, I identified several other topics to learn. I am new to coding and used this challenge to improve my skill set and confidence.
I settled on building 4 packs, each with the following elements:
- a formula and table button to perform calculations,
- a custom column to return a string,
- a formula using sparse number array parameters and a for loop, and
- a formula with schema that returns an object.
Then, I looked for a use case related to our service business and decided to build 4 packs for a dashboard to track dummy referral data.
Some of what I built is possible using the Coda formula language, but I moved forward in an effort to develop both my pack building and JavaScript coding skills. By knowing what's possible, I am better able to identify other scenarios for a pack.
- The dashboard uses 2 Tables and 4 packs.
Key Learnings
- How to code both a custom button and formula, using shared parameters, to perform percent calculations.
- How to code a custom column to display messages in HTML.
- How to code using the sparse number array data type and calculate totals using a for loop to iterate over several table column lists.
- How to code an object data type and object schema and display the number and string data returned on the canvas.
More lessons learned from a newbie coder
- While building packs, I use the tactic of pressing the build button after making small changes to my code, which allows me to more easily address a smaller list of errors as I learn to code and build.
- Coming up with the right name for the various Pack objects is difficult. It seems like the best practice is to find names that are simple but descriptive.
- I used comments in the code to document my logic. I expect that this practice will help me build future packs with similar objectives.
- I stress-test my packs with test docs using dummy data. Sometimes, the results are incorrect even when a pack is built with no errors. The stress-test is an important step to verify that the results are correct.
- When stuck, I reference the Coda Pack SDK or my JavaScript course: Code with Mosh.
Conclusion
The pack building process has been challenging. However, taking on new challenges is part of the fun of life. Bring it on! Coding has always seemed like magic, and Coda’s Packs feature has helped unlock some of the mystery. As a result, I have developed new skills that allow me to build better Coda docs. And best of all, my kids think it’s cool! Thank you Coda for continuing to evolve your great product into something extraordinary.
Link to Demo Doc: link

Log in or sign up for Devpost to join the conversation.