I’ve encountered this issue before, and there’s a workaround. Airtable doesn’t allow direct access to form data in scripts, but you can leverage the table where form submissions are stored. Set your automation to trigger when a new record is created in this table. Then, in your script, you can access the most recent record, which will contain the form data.
Here’s a code snippet that might help:
let formTable = base.getTable('Your Form Submission Table');
let query = await formTable.selectRecordsAsync({sorts: [{field: 'Created time', direction: 'desc'}]});
let latestSubmission = query.records[0];
// Now you can access the form fields
let fieldValue = latestSubmission.getCellValue('Field Name');
This approach lets you work with the submitted data and send it to your remote database. Remember to adjust field names as needed. Good luck with your project!
Hey there, I’ve been using Airtable for a while and ran into similar issues when I first started with automation scripts. From my experience, you can’t directly access form data in the script like you’re trying to do. Instead, the form submission typically creates a new record in a table.
What worked for me was setting up the automation to trigger when a new record is created in the table linked to your form. Then, in the script, you can access the newly created record’s data.
Try something like this:
let table = base.getTable('Your Form Table');
let query = await table.selectRecordsAsync();
let newRecord = query.records[query.records.length - 1];
// Access form fields
let fieldData = newRecord.getCellValue('Field Name');
This way, you’re working with the table data that the form creates, rather than trying to access the form directly. Hope this helps! Let me know if you need any clarification.
yo jessicadream, i feel ur pain! airtable can be tricky. heres the deal - u cant grab form data directly in scripts. instead, focus on the table where form submissions go. set ur automation to trigger when a new record appears there. then u can snag that fresh data and send it off. hope this helps!