# How to do procedures?

**URL:** <https://connect.superhuman.com/t/how-to-do-procedures/28072>\
**Category:** Ask the Community\
**Created:** [January 14, 2022, 5:16am UTC](https://connect.superhuman.com/t/how-to-do-procedures/28072 "2022-01-14T05:16:13Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Max\_OBrien](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/max_obrien/32/49285_2.png) [@Max\_OBrien](https://connect.superhuman.com/u/Max_OBrien)\
**Post date:** [January 14, 2022, 7:30am UTC](https://connect.superhuman.com/t/how-to-do-procedures/28072/2 "2022-01-14T07:30:18Z")

</div>

@Connor_McCormick1

your option 1 is the one i use most.

i regard **tables** as a type of **class** (using OOP concepts here), so **rows** are **objects** , **columns** are **attributes**.

so **formula** columns are **functions** , they take other columns as arguments and return values.

by similar analogue, **button** columns are object **methods** , again, taking other columns as arguments.

if i need class methods, i create a seperate 1 row table for those. and i create similar 1 row tables for global procedures. they have columns for arguments.

your option 2 ‘use a pack’ is possible but not good

currently packs run on the coda servers, so there is an indeterminate delay in their execution. also, it uses javascript and not coda language, so the idiom is very different and complex.

option 3 ‘black magic’ is possible but not supported.

you can insert pure-text formulas into the json object of an Action column and it will be executed. it requires use of unsupported functions and depends on the inner structure of coda objects - so it could break if coda change stuff in a future release.

i use this ‘black magic’ in my BASIC and JAVASCRIPT emulators, if you want to take a look.

> [@A Demo of Javascript translation to Coda](https://connect.superhuman.com/t/a-demo-of-javascript-translation-to-coda/27160):
>
> Again, this is just a proof of concept. just to demonstrate that it is possible to take Javascript code and run it in a Coda document. only a tiny subset of the language is covered in this demo. later i will expand it to cover most of the useful statement types and to provide some syntax checking and error messages etc. but for now - it shows what is possible max

i am working on a document to explain this trick clearly (but client work has pre-empted that so far).

finally, i have just recently posted a technique to execute simple formulas using named variables that i want to modify to allow named arguments as well, it does **not** need any unsupported black magic. watch this space.

> [@Math solver formula](https://connect.superhuman.com/t/math-solver-formula/28035/9):
>
> @Paul_Danyliuk, your clever trick inspired me to do this… This table allows you to enter simple formulas and give then names so you can refer to those names as variables in other formulas. Absolutely no Black Magic, Dark-Side Forces or Occultic Voodoo used at all! Just pure, clean, supported Coda formulas is all! enjoy Max

respect  
max

---

_[View the full topic](https://connect.superhuman.com/t/how-to-do-procedures/28072)._
