Update Record with a Form

Hello! I’m new with databases- I get it, I “understand” the relations, etc. But I’m horrible with organizing tables properly i.e. “Do I make a separate table for these objects?” etc. (Just to give an idea of where I stand) So I’ve read through other examples such as here: Building your own database without technical experience // Baserow and have used it to more or less guide/translate it into the fields I need.

So the closest I came to anyone discussing my dilemma is here: Prefill form with record info to update records

I’d like to explain my issue not only for assistance but also to provide a real world scenario.

What I’ve got is 15 Cisco 52 port switches at different locations and all with several VLANs/trunks assigned on each port. What I’m trying to do is make a simple form for the junior (and some senior) techs to be able to update a change to one of the ports.

I have 2 tables, a PORT table w/single field of 1-52 and a VLAN table w/single field of the various vlans listed.

On another table I have set to the location for example, “Room1 switch” with 2 fields. One linked to the PORT table and the other linked to the VLAN table. And that’s basically it.

Works great except that if I make a form rather than manually filling the cells, it adds another record. So the first record is port 1 with vlan 55, lets say. And after using a form it will add at the very bottom the same port but now with a different vlan. Which record is correct? Hence my dilemma. In Access or Libre Base this would (I THINK) be akin to setting the “update cascade” option when creating a relation.

Unless I’m just approaching this wrong from the outset? Another “argument” (if you take my meaning) is if I had to update a single record out of 2000, rather than sorting or filtering, would it not be easier to just open a form, refer to some fields and make the change? I hope that makes sense. Furthermore, even if I’m manually updating each cell, how does one know if a duplicate isnt being created? Lets say out 2500 records?

Any help would be greatly appreciated! Thanks!

So in essence the question you are asking is (as the title says) “Can I update a record via a form?” and the quick answer is: no unless you build a middleware yourself (which requires you to be technical).

Capture a form submission

You have 2 ways to capture a form submission.

Way One, use the redirect link

You can specify a redirect link for your form where a user will be redirect to an url (which can be your server) after submission

Way Two, use webhooks

Wehooks can be set to call an endpoint on your server every time a row in a table is created for example

Technical solution

You could go with either option on how to capture a form submission, whatever is more convenient to you. But once you have captured the submission you could have a look at what has been submitted, then take a look at the data in your table and see if the new record should in fact be a new record or if you should delete that new record and update another record instead.

This is not an amazing solution, since you will often need to delete entires that have just been created, but it should be an option that will work consistently!

Of course this requires you to be technical and set up a web server yourself that can handle these requests, if you aren’t a developer or don’t have somebody on your team who is a developer this might not be an option for you. There might also be other no-code tools that can help you accomplish that, but I am not an expert on that.

What about having an update functionality as part of forms in Baserow?

If you don’t want to go with the technical solution above and instead want to be able to just tick a box somewhere that makes a form an “update form” instead of one that creates records then that would be a feature request.

My guess is that this can be very complicated since you need to set a key that is being used to update the record, or at least somehow link to the record that should be updated, maybe a user would need to select the record they want to update in the form, but then you leak a lot of information, there are for sure a lot of things to consider here.

If you do think this feature is useful either way, maybe you can write down your thoughts on how this should work more specifically in a feature request either in this forum or on our Gitlab issues board. We will the discuss this internally and make a decision as to if we want to implement that feature.


if I’m manually updating each cell, how does one know if a duplicate isnt being created? Lets say out 2500 records?

Uniqueness constraint would probably be the answer here, we have discussed that idea a couple times before, here are some references:

Hopefully this was helpful to you :slightly_smiling_face:

1 Like