Can you help me understand how to assign a value to a field in Bubble.io when the field's data type is a reference to another data type?

Hey everyone, I am new to Bubble.

Can you help me understand how to assign a value to a field in Bubble.io when the field’s data type is a reference to another data type? Specifically, I’m working on a workflow where I need to link one data type to another. For example, let’s say I have a data type named ‘Hotel’ which needs to reference another data type called ‘HotelGroup’. How do I correctly set the value for this reference in my workflow, particularly when creating or updating an item in the database? Any guidance on using dynamic data for this purpose would also be appreciated.

Hi there, @ndiayemethod… with what you are showing in the screenshot (assuming you have the proper constraints on the search to get to the “right” hotel group), you should be good to go if you just add the :first item operator to the end of the expression.

The above being said, you probably shouldn’t need to do a search because I am guessing you know the hotel group with which the newly-created hotel is being associated, right? If that is the case, you should be able to reference the hotel group some other way. If you can share more details about how hotels and hotel groups are related and how a user creates them, I’m guessing there will be a better answer than searching for the hotel group.

Best…
Mike

P.S. You will be doing yourself a big favor if you don’t let issues pile up as you develop. So, in other words, fix those 27 issues asap.