Creating new entries from a long text field

Continuing the discussion from Creating new row entries from a long text:

Since this thread was closed and I’m facing a similar problem I was wondering if someone could help out.

I have a Long text field in my table, lets call it “Task Submission”, that I would like to create entries in another table from each new line of text, as shown in the image below.

image

Is there a Way to script this to run manually or automatically. I have an enterprise plan.

I need this because i need users to submit new tasks that need to be followed in another table.

thanks

Are the task names known? Is there a maximum amount of tasks that can be entered?

It’s definitely possible to have some javascript code parse over the text field and transcribe returns into a linked field - the tricky part will be knowing what triggers words and numbers within the text field to be a task, and what separates one task from the next.

The tasks are coming via a form submission, so they can be anything .
There is no Maximum but I don-t expect anything above 10.

Ideally, the script would be triggered via form submission or to run every day.

I’m sure this would be an easy task for someone with java script knowledge :slight_smile:

I think What I would like to do is similar to this:

Linking Existing Records Using Automations | Airtable Support

Except I would like to create the new records (tasks) from an existing field. So each task is unique for each project

Hi,
change table1,2 and pri2,lnk2 names

const table=base.getTable('totals1')
const table2=base.getTable('totals2')
const query=await table.selectRecordsAsync({fields:['Task Submission']})
const arr=text=>text? text.split('"').join('').split(`\n`):[]
const newrow=r=>arr(r.getCellValue('Task Submission')).map(ln=>({fields:{'pri2':ln,'lnk2':[{id:r.id}]}}))
const crt=query.records.flatMap(newrow)
while (crt.length) await table2.createRecordsAsync(crt.splice(0,50))
1 Like