Looping @For not working

I have a text field called CONTENTS with value of “Text1, Text2, Text3, Text4, Text5, Text6”.

On another computed field called SHOWTEXT I have this formula:

temp:=“”;

textstring:=@Explode(contents);

@For(n:=1; n<@Elements(textstring); n:=n+1;temp:=textstring[n]);

temp

Problem: the SHOWTEXT field will only show “Text5”.

Seems like my loop is not working. I would appreciate any help, please? Thanks ahead

Subject: Your loop formula is wrong

The right loop formula is:@For(n:=1; n<@Elements(textstring); n:=n+1;temp:=temp:textstring[n]);

then the SHOWTEXT field will show:Text1; Text2; Text3; Text4; Text5