Hi there,
First post here. Absolutely loving WeWeb.
Is there a way to directly bind form elements to my data (in Airtable), so that users can edit the data with a live connection, without having to submit a form?
All the best,
Hi there,
First post here. Absolutely loving WeWeb.
Is there a way to directly bind form elements to my data (in Airtable), so that users can edit the data with a live connection, without having to submit a form?
All the best,
Itās sadly impossible with Airtable, as Airtable has pretty strong rate limits.
To āfakeā it, you could use the Airtable data as the init value for your form inputs, and having on change
workflows that will change the data in Airtable.
Keep in mind that changes are definitive (never trust users is a classic law of UX haha) and use debounce options on inputs to not overwhelm Airtableās API
Thanks, Quentin!
Iām happy to move away from Airtable, because letting users make live updates without needing to āsaveā (i.e. submit) is an important part of my UI. Would another data store make this possible?
For now, itās just a prototype for myself, so I followed your suggestion. I created a global workflow that updates the Airtable record with the contents of all form fields whenever one of them is updated. Itās working a treat - is this a viable solution for a launch-able product, assuming a different datastore?
Thanks for the reminder on debounce!
For the workflow, itāll work for a MVP for sure!
I suggest Xano if youāre used to Airtable. Itās a powerful backend that is still nocode
Thanks, Quentin! Iāve just noticed my workflow has broken. It wonāt update the Airtable record. Iāve clicked through the error message and canāt figure it out. Do you know what might be the problem here?
Can you check in the response
object to see what was the error message returned by Airtable?
Certainly. Thanks for your help. Itās this:
response
data: "
Cannot PATCH /designs/f8385601-12dd-46b8-a753-73e6f8d52b5b/cms_data_sets/cb5793ed-13a1-45d8-a2ce-3dc82c059e4d/airtable/record/
"
status: 404
statusText: ""
Iām using the āUpdate Recordā action.
OK, the action of pasting that made me realize the 404 was happening because the action isnāt passing the record ID. Iāll try to figure out why and post again if Iām still stuck.
No worries, gonna test and learn
Hey Quentin,
That solved the 404 - thanks for prompting me!
I now have the input elements updating Airtable on change, but Iām struggling to populate them with an initial value.
My setup is a ādashboardā page which lists all the records in a datagrid. Thereās a button in the datagrid that loads the record ID into a variable then changes the page to an āedit recordā page.
I want to populate all the input elements with the existing data from Airtable. For example, the āclientā short answer element should have the clientās name in it.
How should I pull the existing data in there? Iāve tried enclosing the whole page in a div, which I bound to the relevant record, using the record ID variable. That allows me to use existing data as Init Value, but prevents me from using the input element in the On Change action.
Iām guessing the answer might be an array formula?
Alright. Iāve made it work with a version of this formula in each init value:
getKeyValue(lookup(variables['Record ID'],collections['Airtable table']),'Airtable field name')
Is this the best approach? Is there a way to do it without creating a different formula for every input element?
I think what might be easier would be to store the whole Airtable line in a variable as an object in WeWeb, then binding the form inputs to the proper keys in this variable.
Iāve done this small video example, hopefully itāll help: Loom | Free Screen & Video Recording Software | Loom
Thanks, Quentin. That worked for me.
Glad it helped!