I always face this issue and wanted to get your perspective on the right way to do this,
I want to have one string that concatenates several rows of a repeat region and put a new line between each row. At the end of the repeat, I want to be able to return the resulting string.
However, the variable research seems empty after each iteration and output is returning a space only.
Here are the formulas used at each step:
Before the repeat: research = ' '
Inside the repeat: research = research+'Page Title: \'\'\''+title+'\'\'\', Snippet: \'\'\''+snippet+'\'\'\', Link: \'\'\''+link+'\'\'\' \n\n'
Outside the repeat: output = research
It seems like the research variable inside the repeat is reinitialised at each iteration
and that the research variable after the repeat is taking the value of the research variable that was before the repeat.
In case you find the concatenation speed a bit slow, I recommend writing a custom formatter - but that’s just if you find it slow.
In my case, I had to concatenate many lines (+1000), and found concatenation through Wappler steps is significantly slower than concatenation directly in NodeJS (or PHP)
@Apple@Teodor is this global variable definition in wappler shared across the entire application instance? Meaning is it equivalent to
global.sharedVariable = “This is a shared variable”;
in other terms, when i have multiple users and they’re both trying to access or change this variable, they’re going to see each other’s changes because there’s only one instance of that global variable?