Hi I’m very new to Unreal Engine and trying to figure out if it is even possible to convert a Data Table to a Combo Box using Blueprint. To me it doesn’t look like it but I’m not sure if I’m missing something or not. Can someone maybe help me out? I’ve attached what I’ve been trying to do. Print Strings are really just for testing purposes, but any feedback would be appreciated.
I believe you are very close, try it like this:
OK, so that does work. Thanks. So I’m trying to understand this a little bit better so I know what I’m doing rather than just poking in the dark at stuff. Is there a good reference for learning the basics of this or can you explain a little why that works vs. what I was doing? I’ve been going through the video tutorials, but I haven’t made it through them all so if it’s in there that’s a good enough answer for me. It’s just been quite a while since I’ve done any coding and this is not exactly coding either.
When you work with blueprints, you are very often dealing with object-oriented programming (OOP). ComboBoxString92 is the entire widget object composed of smaller bits of functionality. You can explore some of its elements in the details panel of the widget designer. The most important element of the combo box (the business end) are its Options - the strings that you select from a dropdown.
When you created/added that widget, you were given a reference to that object - that very node that reads ComboboxString92; it grants you access to the object. You were trying to replace that reference with another one. I used the existing reference to update one of the elements of the widget.
tl;dr - this node is a pointer
The first 2 paragraphs briefly describe OOP in UE4:
The info about objects, references, setters and getters is scattered all over the documentation, not sure if there is one specific location that has it all. Here’s one:
Awesome. Thanks again for the help.
I do have another follow-up. If my data table row has duplicate entries in it is there a way to add just unique items to the combobox?
You could create a temporary string array to act as a filter:
I iterate through the (fake) Datatable and try to add a string to a temporary array. AddUnique returning -1 means that the entry already exists, so I do not add it to the ComboBox.
Thanks that helped me get it. I had to use true instead of false and do some data conversation but I got it.