How to Use a Firebase Field Value as a Variable Name?

Database & APIs

Hi everyone,

I’m trying to figure out how to use the value of a field from a Firebase document as a variable name in my app.

Here’s a simple example of what I mean: In my Firebase document, I have:

FieldName: "username" ; value: "John"

FieldName: "result" ; value: "username"

I want to use the value of "result" dynamically to access the value stored in the "username" field ("John").

Is there a way to achieve this in FlutterFlow? Any tips or workarounds would be greatly appreciated!

Thanks in advance!

What have you tried so far?

I retrieved the value from the "result" field in Firebase (e.g., "username"), but instead of displaying the content of the corresponding field (`John`), it only shows the field name (`username`). I haven’t been able to make it display the actual value dynamically.

Did you check FlutterFlow's Documentation for this topic?
Yes
1
3 replies