Airtable record data in Javascript code block

Hi All,

I have some HTML running in a Code Block on the List Details page that requires a variable passed from an Airtable cell.

In essence, the HTML is:

<h1> Title </h1>
<p> {airtable record data} </p>

It’s super, super simple. The reason I need to do it this way is because I’m later planning to use the data from Airtable as a variable for some Javascript, but I just want to test that I can actually pull that data first in the code block.

The data is exposed to the UI via the List Details block too, but I still need to be able to interact with it in the Code Block.

Can anyone advise on how I pull data from a record in this way? Just a single cell of data.

Thanks.

On a List Details page, the fields from the corresponding record in Airtable are available to JavaScript in the window.records object. You can write JS that copies it out of there and into the content of a <div> or <span>.

@dcoletta, thanks for the message. Do you have an example of how to implement this?

check this out: @{LOGGED_IN_USER:NAME} For personalized content - #2 by dcoletta

not exactly the same but very similar