Skip to main content
Solved

Workflow string concatenation

  • April 26, 2023
  • 3 replies
  • 254 views

eqbstal
Superhero (Partner)
Forum|alt.badge.img+21
  • Superhero (Partner)
  • 701 replies

I know that the following will assign 210 to the variable CompanyId (in a script task):

execution.setVariable('CompanyId','210');

What if I want to prepare a KeyRef for this that would contain in the end: 'CompanyId=210^’

I'm looking for something like concatenate. I've tried:

execution.setVariable('KeyRef’,'CompanyId=' + '210' + '^’);

Ultimately I want something like:

execution.setVariable('KeyRef’,'CompanyId=' + ${CompanyId} + '^’);

In this case ${CompanyId} is a variable set in an earlier step of the workflow.

So, my question is how to perform a concatenation in a system task?

Best answer by eqbstal

Solutions are sometimes to be found in the strangest places.

I used a system task to perform the concatenation:

Notice that I didn't include any quotations

3 replies

eqbstal
Superhero (Partner)
Forum|alt.badge.img+21
  • Author
  • Superhero (Partner)
  • 701 replies
  • Answer
  • April 26, 2023

Solutions are sometimes to be found in the strangest places.

I used a system task to perform the concatenation:

Notice that I didn't include any quotations


eqbstal
Superhero (Partner)
Forum|alt.badge.img+21
  • Author
  • Superhero (Partner)
  • 701 replies
  • May 2, 2023

In the previous solution I prepared a variable that contains the KeyRef. This KeyRef could then be used in a projection Read option.

I've noticed the following shortcut also works:

 


eqbstal
Superhero (Partner)
Forum|alt.badge.img+21
  • Author
  • Superhero (Partner)
  • 701 replies
  • May 3, 2023