Dropdown with Option Value Datatype = Document Reference

Hi,

I can't understand what is the best practice to solve this situation using FlutterFlow. What I do know is how to create a workaround, but not interested in that unless someone tells me that it's the flutterflow way to solve the scenario.

I need to populate a dropdown with labels (names of Participants) with values being document References for each participant name. When creating a Document, or updating it, there's a collection with a Document Reference data type behind this need, that's why I need the values like this, but FF isn't giving me the option in the data type list.

That's a very common and basic scenario where I concrete a relationship between entities. It could be Product -> Category. How could I bring Category Document References when adding products? Should I make it a string data type instead of a Document Reference? sounds like it's wrong and inconsistent in terms of data moderling.

If I leave it as a string, then I can't add as is into my database, and need to make a query using the name (which is a problem if I have two identical names) through an action, store it in a variable and then pull it instead of pull it from widget state.

Please please, someone help me here. ❤️

6
7 replies