Modifying a Data base field once created

Hi I am stuck working how to modify a DB field once created. The web app i am creating is to be embedded into a learning platfor course. Mainly to be used once. The page displayed allows text input by the user and the workflow creates a few fields called “Bar 1 - 8”.

My issue is if the user wants to run this page again, the workflow will create another set of Bars 1 - 8. in the database.

I want to include in the workflow a action either clear or delete these bars or “fields” before they are recreated again. Deleting a thing wont work or give a valid path. Deleting a list of things never returns a valid answer.

This is how the Bar is created, then the result when the button is pushed.

I effectively want to remove or replace the data in every field in the database image and not create a new bunch of fields on the end.

Any help appreciated.

hey @Simon-Thompson

deleting the data should definitely work. Just search for any bar 1-8 record created by current user and delete them in bulk when the button is clicked. then create the new ones. If none exists none will be deleted. The user is logged in, correct?

you will have to create workflows similar to these.

A conditional (can be a URL parameter) to check if there is data, if there is, use a workflow to create, if there is no use a workflow to edit a data.


Hi Hanan,

Thank you for your response.

I am at the beginning of creating this little app and haven’t organized a user login yet though I am beginning to think I might but it is hopefully going to be embedded in a learning platform so each instance will be local.

This is my interpretation of what you suggested and the issue reported: I stuck isn’t empty on there.. didn’t help

I appreciate your help.

Warm regards

Simon

Of course, everyone is learning. Well, assuming your app has more than one user, you need a way to find the records created by this user only to edit/delete. If you don’t have login feature yet, you can simply add an email property to datatype and an email input field in the form. So that when the record is created it is tied to a single user. Though I am not sure why you are creating a row for every Bar, shouldn’t it be a single row?
here’s how to do it: https://drive.google.com/file/d/1N18pyMshrQs9tncPgFP8Hpp76-v3lUpd/view?usp=sharing
and here is an editor link to play with it: Dropdown-issue | Bubble Editor