How to structure workflow when deleting one of the data in list-type field and adding this data to another field?

I’m building a service like airbnb and having a question about updating list-type fields.

For example, there are “House” and “City” data types.
“House” has the house name and city data, and “City” has the city name and “houses” data that is type of list.

What kind of workflow should I build when the house owner wants to change the city name from “City A” to “City B”?

I’m confused about changing city data. It is possible to add house information to city B by “changing a things”, but the house information will remain in city A as well.

I thought about setting up a delete button for each input, but in reality there are so many inputs, and I thought this method was not good.

Thank you.

Do you really mean change the City Name? Or change the City the house is in? (I assume it’s the latter, as the former makes no sense…)

So, to change a House’s City, just use a ‘Make Changes To A Thing’ workflow action - the thing to change being the House, and change the City field to the new City…

If you also want to Change the City data (for both the original City and the new City), you’ll need to run a ‘Make changes To A Thing’ action on the original city, select the Houses field, and Remove the specific House from the list.

Then Make changes to the New City, select the Houses field, and Add the specific house to the list…

That said, I wouldn’t recommend having a list of Houses on the City datatype at all.

1 Like

Just change the “City” name. If you have reference the “city” inside the “house” data type, then no need to do anything.

Ankur@ Nocodetalks
Looking for a Bubble Coach? Check out here

Thank you for your reply!
You’re right, I wanted to hear when the owner changed the name of the city where the house is located when he mistyped it.

Owners can select the city of their home from a dropdown tied to city data.

If you also want to Change the City data (for both the original City and the new City), you’ll need to run a ‘Make changes To A Thing’ action on the original city, select the Houses field, and Remove the specific House from the list.

I’m confused by this flow.

That said, I wouldn’t recommend having a list of Houses on the City datatype at all.

I’ve included the house list in the city data for export purposes, but I want to keep it simple, so I’ll follow your advice and not have the house list in the city data.

Thank you

This topic was automatically closed after 70 days. New replies are no longer allowed.