Dec 14, 2020 11:49 AM
I’m not an experienced coder, but I’ve written enough VBA & Python to have a degree of comfort with Java Script and write some basic routines. That said, my greatest degree of confusion here is referencing specific fields, records, cells, tables, etc. While loading the bases seems straightforward & part of every example script, documentation seems to drop off from there. Did I miss something? Can someone point me to a cheat-sheet with more examples like:
.record.getCellValueAsString
.getCellValueAsString
The examples provided, “Loading records, Currency converter, Running total, Mark duplicate, Summarize linked records” are helpful, but more of these would be better. The user forum examples are a little scattered and specific.
Probably, like most people using Airtable, my scripting issues are pretty basic. For example, one of the things I’m trying to do is just search a column for the highest value and enter the next highest value in the same column triggered by the primary column. Another is search a second column to see if it’s null or zero before entering a value into the next column. There’s a few more, but as you can see I’m not trying anything overly complex.
Bottom line: I’m looking for a list of record, field, cell, etc scripting terms/references.
Dec 15, 2020 05:00 PM
Welcome to the Airtable community!
The official documentation is a great reference. It explains how to get records from a table or view, and how to get cell values from a record.
To search a column for a value, you need to check the field value for each record in the table or view. You need to move away from a “column” mentality because columns don’t exist in an Airtable script.
Dec 16, 2020 12:45 PM
Thank you for your reply and advice on thinking about this differently.
So I’m piecing some things together, but I’m having a little difficulty finding something like indexed documentation that goes very deep for java script that relates specifically to scripting to Airtable and data references. Could you provide a link to what is officially considered documentation.
Also, can I assume Record_ID is another option to reference a specific cell?
Dec 16, 2020 12:52 PM
Dec 16, 2020 01:12 PM
This is exactly what I was looking for. Thank you so much. I don’t know why had such difficulty finding it.
Dec 16, 2020 01:39 PM
Hi @Peter_O
Each person who has started a new Coding and Experimentation Environment has his own feeling about his favorite entry point: before tackling more complex Scripts offered by Experts within this Community, mine were
https://www.airscript.dev/ by @JonathanBowen + this one by @VictoriaPlummer.
Of course, Airtable Scripting
was the place to reach, but was not my favourite starting block.
A little later, 6 Experts of this Community + the ‘first hour’ Airtable Scripting DEV’s taught me Master’s tricks to sometimes go far.
A year’s worth of Script from them can be found right here in this section!
Best,
olπ
Dec 16, 2020 09:51 PM
Thanks so much @Olpy_Acaflo
The way you described having a favorite entry point being variable was very helpful as was sharing those that you found most helpful.