How do I pass a variable with CallFunctionByNameWithArguments?

I am trying to create a function that passes a text variable from a cpp file to a blueprint using CallFunctionByNameWithArguments, but I do not know how to pass variables between the two using it. This is how it looks like at the moment:


this->CallFunctionByNameWithArguments(TEXT("AddItemToList"), ar, NULL, true);

I want to pass the variable


FText ListEntryName

to AddItemToList, does anyone know how to do this?

Don’t you just pass it as another parameter to CallFunctionByNameWithArguments? Or does it get passed as a Name array?

I know that it is possible to pass on arguments like this,


this->CallFunctionByNameWithArguments(TEXT("AddItemToList ListEntryName"), ar, NULL, true);

But when done like that, it is just the text ListEntryName, and not the text that it has been set to.
I need to be able to pass a variable that is set in the cpp file for the system to work as intended. There is no need to pass an entire array though

You can format the TEXT()