Unable to use dropdown for database columns

I am hoping one or more of you can help.
I want a dropdown to select an entity from my database. I was able to do that because all entity names are in one column of my database so all I had to do was to look for unique elements in that column.
The second dropdown is for selecting what metric I want to see. This is where I am struggling to even think how to look for it. I don’t see any option that lets me look for column names in the database (ideally, I want this dropdown to show only the names of my metrics but not entity name or period).
I am attaching two screenshots if that helps you help me. Thanks!


Hi there, @pranav42… if I understand your post correctly, you could use an option set with the options being your field names (which you would have to manually enter, of course) or you could give this plugin a shot to return the fields names as a list of texts.

Hope this helps.

Best…
Mike

2 Likes

Thanks, Mike. That worked perfectly and I really appreciate you taking the time to help.
One follow up I have is - how do I go about showing data based on this dropdown?
What I want to do it to show the data by selecting an entity (first dropdown) and selecting a metric (second dropdown).
Entity is a column in my database. So I can simply use the first dropdown and have a constraint in the repeating group that search for data only if entity = dropdown1’s value.
How do I go about showing only the metric which I have in the second dropdown (using Options Set).

Thanks
Pranav