Is there some way to build a string with branching? I have a JSON and want to grab id from each entry and append them all together, i.e. id1&id2&id3.
I created a variable {{ids}} with {{empty}} and set up advanced branching. With logging, I can see the ids, but my attempts to append to {{ids}} doesn't seem to work. Additionally, accessing {{ids}} outside of the loop reports that it is empty.
Hey @Hariharan Iyer the bigger problem for @Anthony Nguyen isn't going to be the lack of a concat function, but rather that he wants to build the strings as part of advanced branching.
Automation doesn't support "global" variables, and there's complications with scope of variables inside of branches. Additionally there's some confusing and interesting problems introduced because many rules (including Advanced branching across multiple issues) happen asynchronously and so may stomp on each other.
Basically if you're thinking that everything runs sequentially... it doesn't. It's been a while since I've been down the rabbit hole, but @Bill Sheboy always seems to be able to explain it well.
But anyways @Anthony Nguyen, that's probably why your variables are turning up empty.
I suggest you take a look at these open issues:
`concat` doesn't work with smart values, but if you're getting the ids as a jsonStringArray, you should be able to do something like this without branching
{{jsonStringArray.replaceAll(",\s+", "&").replace("[","").replace("]","")}}
Hope that helps!
~ Hariharan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.