Append node to make string with array elements

hello, i would like to ask about append node in blueprint,

To make strings which contains number from forloop node, i made connections like this,

I suppose highlited area will be “sphere5” and “sphere6” while running through forloop.
And i predict the result will be like this.

But all sphere becomes red, I can confirm each appended strings are correct by print string though,

I would like to get advices.

thank you, i set the tags to sphere and chekced with “component has tag”,
then append node worked properly.

I wouldn’t suggest using Display Names for that; they won’t always be what you expect them to be. What you can do is add Actor Tags to those spheres; or, to automate that, just add an Int variable called Index in the sphere blueprint, expose it to be able to set a value in a viewport (there’s a small icon that represents the eye next to every variable in the list), and on begin play add a tag like “sphere” appended with Index.ToString(); And then check the spheres’ tags, not names, because tags will always be what you set them to be;

Alternatively, you can check indices themselves; since you already Get All Actors of Class, no Casting will be needed, Just If (Index == 5 || Index == 6) => do that, Else => do this.