Assigning values to mulitple fields From a single dropwdown

Hi there Experts,
I have a challenge of populating a collection from a dataset.

The setup: I have two collections - one is an item collection (like ingredients for a cake, where each ingredient has two fields – a name and a link).
The other is a Recipe collection (Each recipe has different ingredients for a specific recipe along with the relevant links for each ingredient).

My Aim: I want my users to be able to upload items (to the items collection) and create from these items a recipe (in the Recipes collection). And then display, filter and share the recipes.

My Problem: I got everything set up but one single thing – when someone selects and ingredient from a drop down – I want to write in to the recipe collection both the name of the ingredient and its corresponding URL from the item collection. For example: if a user selects “White Sugar” from the dropdown (with labels linked to the items collection, and connected to submit to the Recipes collection) I want the URL associated to “White Sugar” (from the items collection) written into the relevant field in the Recipes collection.

Is there a way to use original elements in Wix to achieve that natively (no coding)?
Is there readymade code for that?

I think reference fields are what you need: https://support.wix.com/en/article/about-reference-fields-in-database-collections

If you create the field “item” in “Recipe” collection and connect it using reference field to “items” collection, it will return an id of the corresponding item, from where you can get all necessary info

Hi there, Viktoria. Many thanks!
I have been trying to exactly that (and other options as well) but am unsuccessful. Is there a chance you could help me out using a short screenshare?

@leelaster You’re welcome! :slight_smile: However, I don’t think there is a way to do it entirely without code or a readymade code for it, so probably you’ll need to write some code for that (or ask a Corvid developer to write it). I’m just able to help with the general approach.