1

I am wanting to call the following URL in my Jitterbit HTTP target:

https://xxx.visualstudio.com/DefaultCollection/_apis/wit/workitems/[vstsId]?api-version=1.0

where [vstsId] is dynamic and should be supplied from a global variable.

Is it possible to have dynamic urls in the target?

I could make the whole url dynamic if need be.

Any ideas? (I'm using javascript scripting rather than the Jitterbit scripting)

Thanks Martin

Martin R
  • 55
  • 1
  • 7
  • similar to : https://stackoverflow.com/questions/46597407/dynamically-generate-url-for-http-source/47354349#47354349 – Martin R Nov 17 '17 at 15:45

2 Answers2

1

As W3bguy said. you call it in the script as $vstsld. Now you can pass in a test value data into your variable as well. just add the curly brackets inside your variable like the below
example https://xxx.visualstudio.com/DefaultCollection/_apis/wit/workitems/[vstsId{1234}]?api-version=1.0

Tdubs
  • 29
  • 7
  • While this example in the link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - [From Review](https://stackoverflow.com/review/late-answers/28309768) – Adam Marshall Feb 12 '21 at 18:54
0

Yes, you have it typed out correctly. At the beginning of your operation chain (or at the point where you know what $vstsld should be, and you can declare it), simply add a script to declare it, or add it into a transformation where you get the data from. At any point after that, in the current operation chain, you can access the value in that variable. Just make sure you set it with the $ symbol, which makes it global.

$vstsld='some value';
w3bguy
  • 2,215
  • 1
  • 19
  • 34