Data Types reference each other through Lists of "the other"

Hello,

I have two data types, one called Services and the other called Locations. The idea is that a user will first create through one workflow Location records where they offer particular Services. Then through another workflow they will create the Service records. I would like the Locations data type to have a field called Lists of Services (multiple) and the Services data type to have a List of Locations (multiple) field so that I can reference A.) all services provided at a particular location and B.) all locations where a particular service is provided.

I am using a popup element in the Service record creation workflow and have a MultiDropDown input with the data source set to Locations. A user can select the predetermined locations where they want the service to be provided and these locations are successfully stored in the Lists of Locations field. However, at the same time I would like the workflow to identify the locations in the MultiDropDown and save the service only to those locations and in the List of Services field (Locations data type).

I can’t seem to get it with the available Bubble logic and have begun to wonder if its even possible. Any help greatly appreciated!

Definitely possible, and very simple…

  1. Use the multidropdown’s value (a list of locations) to set the Locations list field on the newly created Service when you create the service using a ‘Create a new Thing’ action

  2. Use a ‘Make changes to a list of things’ action to add the newly created Service to the Selected locations (you can either use the multidropdown’s value again, or the result of step 1’s Locations as the list of things to change), and just ‘Add’ the results of step 1 to the Locations list of Services.

Wow, thank you so much. In hindsight it seems so straight forward, but I guess that’s the process of the learning the app. Thank you so much again!

1 Like