If you prefer a nocode way you can add a workflow that calculate the text iterating over the array with a for loop.
Have a look at the options you have with the new workflow branching.
Hi dorilama, I think I got the concatenate part, and how to bind the whatsapp number to a value, however I still have trouble with the for loop, I don’t know how to do it, I prefer to do it in no-code since I understands better that way.
Is it correct that I should make a new variable containing for loop of the product quantity+product name? And how do I do it?
I’m on my phone now but you should be able to make it following the for loop docs.
You need to create a text variable to store the result. It works as any other variable in weweb: you need to create it in advance (not inside the workflow).
sorry I’ve tried to understand the docs but couldn’t, right now, I created a workflow containing for loop reiterating over my cart products and quantity, and it returns my products and quantity one by one(each loop), how do I put them in a list in my link?, also the concatenate, how can I make the words skip a line? I seem to only able to put one space between the words. thank you
inside the loop you need to add a “change variable” action where you concatenate the strings.
You can add a new line in a string with \n. You need to check whatsapp docs to see if they allow new lines or if they use a special way for adding them
Thank you, I figured how to add new lines, but to concatenate the loop still can’t figure it out. So I set the loop for my cart array, how do I concatenate all the products and quantity inside?
Have you tried to set up the loop in the workflow?
Have you added the change variable action inside the loop?
Have you seen what workflow variables are available to use in the loop workflow? You should have access to the current loop item.
How is your workflow looking?
Read again the documentation, maybe try to implement the example first so you grasp how to use it and then adapt it to your specific case.
I set up the loop, tried the change variable, yes I can access the current loop item, but I don’t know how to add to the next loop item and so on. All I was able to do was change the variable to the current loop item each loop, I cannot figure out how to add
if your string variable to store the result it’s called “final-string” then on each loop you need to change “final-string” with the value of “final-string” + the string that you want to add.