Hi, I have an automation that sends a web request. I need to send {{lookupIssues}} as a parameter, but it doesn't work because of the spaces in the list (ABC-1, ABC-2, ABC-3)
https://mysite/api?issues={{lookupIssues}}
I've tried creating a variable and using and all of these:
{{lookupIssues}}
{{lookupIssues.trim()}}
{{lookupIssues.replace(" ", "")}}
{{lookupIssues.urlEncode}}
{{lookupIssues.key}}
{{lookupIssues.key.urlEncode}}
None of the above options works.
Is there any way I can remove the spaces before using the variable in my web request?
Thanks!
Currently, the default when a list field is used that way is to join the values of the default attribute with a comma and a space. I have not found this default behavior documented, so it may be better to take some control over it...
Instead use an explicit join() function to force the key to delimit as you wish, with no spacing. For example like this:
{{lookupIssues.key.join(",")}}
Kind regards,
Bill
It worked! Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Carolina Rodriguez
Welcome.
Create a variable (mykeys) and assign it {{lookupIsses.key}}
Then you can remove spaces from the variable as {{mykeys.replace(" ","")}}
and pass it in your url https://mysite/api?issues={{mykeys.replace(" ","")}}
Please let me know if issues.
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.