Use a Cell Value as Input

Topic Labels: Automations
256 0
Showing results for 
Search instead for 
Did you mean: 
4 - Data Explorer
4 - Data Explorer

Hello, I am starting with Airtable Scripting.

I need to use the content of two cells as input text for a function that formats the text in a specific way.

Using this way I only get the value of the first row [0], but this needs to work for every row. It is triggered once a row is added and/or modified. 



if (record && record.records.length > 0) {
  const inputText1 = record.records[0].getCellValueAsString("Index"); // Replace with the actual field name
  const inputText2 = record.records[0].getCellValueAsString("Script"); // Replace with the actual field name

  // Combine the content of the two cells
  const inputText = inputText1 + "\n" + inputText2;

  const jsonOutput = convertToJSON(inputText, sentencesPerSection);​


0 Replies 0