UDataTable, how to get Row Name column into C++ Ustruct

Hi all…
As most know, unreal will auto name the first column of data as “Row Name” when importing in CSV data.

We have a table that happens to have needed data in that default “Row Name” column.

When I call

TArray<MyTableStruct*> tableRows
myTable->GetAllRows<MyTableStruct>( context, tableRows )

I need each MyTableStruct to have the data that is in the Row Name column.

I tried adding a new variable name to my C++ structure FName RowName. I recompiled my source code, opened up the data table and noticed that adding this new property to my structure forced Unreal to create an entirely new column named Row Name with duplicated data in the data table.

This leads me to ask… How do you get Row Name column data into your struct so that you can use it?

1 Like