Dropdown menu from text array variable for internal tool

Hi all,
I’m building an internal tool for my game which accesses a struct that contains maps from which i want to extrapolate each value, and put it into a drop down, to be able to select it in the editor, using the “Drop-down Options” field. Right now I have to type the value directly, which is time consuming. I went as far as creating a function with a for each loop that returns all the values i need, but when I access the actor in editor, only the first value of the array shows up.

This is the function:

This is the tool:

This is the variable i wish to turn into a drop down:

Any idea what I’m doing wrong?

Thanks in advance!

Hey! I think I know the problem.


This part of your code is the most likely culprit.

You enter the return node immediately which will stop the function immediately once you hit it, meaning that every time you set that variable, you are only setting it to the first item in the array and then returning the function so it can never be set to anything else.

If you want every value you will need to either get the whole array to use from that function, or add an input of an index to pull which specific item you need. You can also just add a value to the return node and use that directly if you don’t need to save the variable for later.

Hope this helps :slight_smile:

Thanks @BRGCooper ! You may be onto something. Unfortunately now the value is stuck on the last array item, which suggests that i am getting the whole array, but the array does not populate the drop-down options menu in the way that I’d expect.

I’ve scoured the UE forums and docs for how “Drop-down Options” works and there is absolutely nothing on the subject. No documentation whatsoever. How would i go about populating the drop down with my array? I feel like I’m missing a bunch of steps here…