Is it possible to access data in Data Table Row as array

Hey everyone,

I have a CSV data table that I am accessing in an Actor Blueprint. This BP is responsible for the text that is displayed when characters speak.

I am able to access all the rows in my CSV, but I am unable to get the data per row into an array for easy referencing later on when I am expanding the project. Currently, I need to connect each Output to the make array (picture 1), but I want to automise this something like in picture 2. Is there a way that this is possible and what am I missing?

Let me know if you have any more questions. Thanks in advance

(Edit: added picture references)

Picture 1:


Picture 2:

Hey @Mr_Wijnen!

Have you tried using an “Add” node instead of the “Append” Node?
Add brings in a single variable to the array and Append adds the bottom array to the end of the top array.

Other than that I’m not very certain of what it is you’re trying to do here.

But I hope that helps! If you need more assistance try to give us some more info!

I tried it real quick and it didn’t work. But here is an explanation of what I want:

Each row returns the following data:
[Character, NextCode, English, Dutch]

I can only access the individual values as shown in picture 1, by splitting the structure pin.
But I want to be able to access them via an array called Languages. To describe it in C++:

Instead of doing:

 new varEnglish = RowDataOfRow("rowname").Get("English")
 new varDutch = RowDataOfRow("rowname").Get("Dutch")

I want to do:

new language[] = RowDataOfRow("rowname").GetAllData 
// results in language[] == [Character, NextCode, English, Dutch]

 new varEnglish = language[2]
 new varDutch = language[3]

Edit: added next part:

So that I eventually can have something like to easily increase the amount of languages and switch between them:

int currentLanguage = 3;

new varLanguege = language[currentLanguage]

Hope this clears it up

Try something like this:

It will start at index 2 so it bypasses your non-language strings, then as long as your struct is COMPLETELY the same type I think it should work. But it would HAVE to be all strings in the CSV.

Otherwise if you flip the data table, there is a “Get Data Table Column As String” that has an output of Array.

Thanks! All the CSV data are strings. But for some reason I am not able to connect the Out Row to the array in because it keeps it a CSV Text Structure.

Well… I don’t know how I ended up doing that but it might throw an error. It was a hail mary pass as it was.

Try un-setting the data table to make the Out Row a wildcard, then connect it to the forEach. It’s going to be in the order of how you connect everything.

The problem here is that a struct is not an array, it’s not a map/dictionary, it’s a class and can’t be iterated over typically. I don’t know that this is doable with a row- which is weird BECAUSE you CAN do it with a COLUMN.

I think this needs a good re-thinking.


I would give each language its own Data Table. Store that as “DT_CurrentLanguage” on the Game Mode. That way you’re not loading up EVERY language just to use one, and switch to whichever Data Table you need through the always-loaded GameMode, keeping all of the other languages unloaded. Then use “Get GameMode, (pure)cast to “MyGameMode”, Get DT_CurrentLanguage” for the input of Data Table on the “Get Data Table Row”.

Then you CAN break it and use the parts you need each time without changing and morphing size:
Character, Next Code, and Dialogue all in one. What needs to change here isn’t the part OF a data table, it needs to just be another data table altogether.

Then, to add a new language, you just drop a new data table in and add it to the options menu and you’re done, it cascades down through the entire project.

It did throw me an error, unfortunately :frowning:

It really needs a rethink, in Unity I was able to make it in this way so it is sad to see that it can’t happen here.

I do wonder however why I seem to be the only one troubled by this, I did not find any other post that had a similar case.

Anyway, I will try your solution somewhere in another day. The current project only needs two languages, I was hoping to make a flexible system and learn UE a bit better.
So until then! And thanks!

(edit: post was send by accident while typing)

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.