How to modify a field without deleting what was already there

Hello
please i need help! i’m a little new to bubble







.

so i have and app where users can sign up and decide to buy or sell a car.
i have the data type CAR and the data type USER

i wanted to have a record of which user sold a car
so on the data type CAR i created a field CAR-SELLER with custom type user, so i could see who is selling the car.
so on the workflow of the submit button that creates type CAR, i did CAR-SELLER=current user, and it worked, on the app data of car i can see the users email that sold it

my problem is:
i also want to see the cars a user has sold on the data type USER.
So on data type USER, i created a field CAR-SOLD with custom type car, and on the workflow of the button that creates type CAR i added an action that makes changes to the data type USER where CAR-SOLD = results of step 1(crate a new car).

what is happening is if a user signs up and fill the form to sell a car called “Camry” after he clicks submit yeah, on the data type USER, the field CAR-SOLD shows “Camry” and on the data type CAR, the CAR-SELLER field records the users email
BUT
if the same user fills the selling car form for a car named “Corolla” and clicks submit, on data type USER the field CAR-SOLD updates from “Camry” to “Corolla”
what i want is for that CAR-SOLD field to record all the cars the user sells, so it should have “Camry” and 'Corolla"

Hi there, @ighohouse… if I understand your post correctly, your car-sold field needs to be a list. Unfortunately, you won’t be able to change your existing field to a list, so you will need to delete that field and create a new one, and when you create the new one, check the box to make the field a list. Then, when a user sells a car, add the car to the user’s car-sold field (which will now be a list of cars), and you should be good to go.

Hope this helps.

Best…
Mike

hello mikeloc

thanks for the help

i was able to create another CAR-SOLD type user field in data type USER that is a list, but it’s saving the email of the person selling the car, not the name of the car. how do i get it to save the name of the car.

in my work flow i did “make changes to a thing”–> "thing to change “current user” " → “car-soldL(which is the field that is a list) add results of step 1(create a new car)'s car seller”
it won’t let me leave it at “car-soldL add results of step 1(create a new car)” because it says its not a user type



I was suggesting that you replace the car-sold field (of type car) that you already had in your User data type with a similar field that is a list of cars, but it sounds like you created a field that is a list of users? If that is the case, it makes sense that the system won’t let you add the results of step 1 (a car) to a list of users.

omg omg it worked!!
thank you so much!!

1 Like