Is this an Unreal Engine bug?!?!?

Why can’t you connect a data table variable to Get Data Table Row?


Hi,

Hope you’re doing well.

Try this step:

  1. Simple promote the Out Row to variable with the right type;
  2. Then connect your ref to the input.

Finally you will get this result:

If you pass the wrong struct type to a Item Data Ref (different of Out Row), you’ll get runtime errors. So If you need to access different row types from the same table reference, I suggest creating structs that inherit from a common base struct — like subclasses in C++. That way, you can ensure that all child structs include the parent’s properties, providing consistency and reducing the risk of errors.

By the way, that not a bug, I think it was designed in way to avoid the developer commit some mistakens.

Hope that helps - take care!

Variable has to be a Data Table Obj Reference.

This is not a bug, it is also not a way for the developer to avoid mistakes as SpecZynk thinks.

Instead it’s because the blueprint doesn’t have the information you might think it does to support that ‘Out Row’ pin.

It’s only possible for that out pin to have a type if the blueprint can deduce the type of the table row at blueprint compile time. One way it can do that is through “hard coding” the Data Table input with the drop down. The blueprint can use this knowledge of a very specific table to set the output pin type.

If you connect a variable up to it, things get murky and it only has the type of the variable to go on. And this is the important part about it being blueprint compile time: It can not get any information from the value of the variable. You may initialize it to the same thing you hard coded it to be, but it’s a variable so it could have changed to anything. So if you have two tables with two different row types and the variable could hold either one, there is no way for the compiler to set the type of that output pin. However, if you set the type of the variable to a specific type of data table (it may not be possible to configure data tables this way in a pure blueprint project) then the compiler can deduce that output type.

This is also why RevOverDrive’s suggestion is close, but insufficient (as you can see in their picture where Out Row is still grey). His variable is of type Data Table Object Reference which doesn’t narrow down the possible row type data structure for the node to determine the type of it’s output pin.

1 Like