seadynamic8 1 Posted May 29, 2010 Report Share Posted May 29, 2010 I want to be able to append to a string, in programming terms, use += operator. For example I want to do something like this: #string = #string + #appendedstring where #appendedstring is a variable string that can change. I want to be able to loop through this so that I can append values to a string basically. Here is a picture of what it looks like right now: I don't want to have to put in $nextlistitem[%keywords] for each keyword I have in my list manually. I would like to be able to do that in a loop. Anyone have any ideas? Thanks. 1 Quote Link to post Share on other sites
Net66 54 Posted May 29, 2010 Report Share Posted May 29, 2010 I want to be able to append to a string, in programming terms, use += operator. For example I want to do something like this: #string = #string + #appendedstring where #appendedstring is a variable string that can change. I want to be able to loop through this so that I can append values to a string basically. Here is a picture of what it looks like right now: I don't want to have to put in $nextlistitem[%keywords] for each keyword I have in my list manually. I would like to be able to do that in a loop. Anyone have any ideas? Thanks. Set List Position 0Loop TotalItems[%keywords]set var #string {1}{2} {1}=#string {2}=nextitem[%keywords] Andy 1 Quote Link to post Share on other sites
seadynamic8 1 Posted May 29, 2010 Author Report Share Posted May 29, 2010 Set List Position 0Loop TotalItems[%keywords]set var #string {1}{2} {1}=#string {2}=nextitem[%keywords] Andy Thanks, that worked. I guess I didn't really think about it hard enough. Quote Link to post Share on other sites
MAtkins 0 Posted July 2, 2010 Report Share Posted July 2, 2010 What about this? set > value = $eval: "{1}" + "{2}";add 2 parameters which are the 2 variables you want to concatenate. 1 Quote Link to post Share on other sites
Barry Sausse 1 Posted May 10, 2011 Report Share Posted May 10, 2011 I think MAtkins has the right idea if you just want to concatenate two (or a small number) of strings. But you dont even have to use eval if you just need to append one string to another string. Just set a variable and for the content choose "Insert Variable" from the left menu in the set variable dialog. Insert the variables in the order you want them to appear. The finished SET node will look like this: Set #somevar = {1}{2}{3}... http://profitevolution.info/string_concat.jpg 1 Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.