Hi, I was wondering if it would be possible to enhance a form’s submission functionality to include the ability to ‘update an object or create it if it doesn’t already exist.’ Do you think this feature could be implemented? Or is there an existing way to achieve this?
Hello @petitalb, welcome to the Baserow community!
I believe this is the feature you’re looking for: Editable form view via field type (#2193) · Issues · Baserow / baserow · GitLab. It’s not yet implemented, but we’ll work on it.
Please check out this thread for potential workarounds while the feature is not implemented: Update row data with forms in Baserow
Hi @olgatrykush,
I was referring to the available events in Application Builder. I’m not sure the feature you mentioned addresses that—does it?
Currently, a button in Application Builder can trigger either a create or an update event, but not both simultaneously.
What I would like is a form that can create an entry if it doesn’t exist or update it if it does. In my application, I had to implement this clunky workaround:
- Create an empty entry on the previous page that links to the current.
- On the current page, have a form to modify the entry.
The major issue with this approach is that I end up with many empty entries if users abandon the form without submitting it. This forces me to manually clean up those unused entries.
It would be really helpful to have a button event that can handle both creating and updating an entry seamlessly.
Apologies @petitalb, I didn’t realize you were talking about the Application Builder. I’ve asked the team to look into your request.
True, It doesn’t exist yet and it’s a good idea. I’ve created an issue.
However , I’m wondering, could you redirect to the “update” page only when the form is actualy saved? As long as it’s not save it doesn’t exist, but when you save it you are redirected to the page with the right page parameter to edit it? May be it doesn’t work in your case?