Inconsistency by pushing and pooling from repository

Hi,

I have Workflow 8.6.1 on Windows Server 2012.

When I use the “Push to repository” task to save values and store the result ID into a local variable, I have it in the format ‘[ID]’. The resulting variable is not usable for further lookups without a manipulation.

Please repair!

Best regards

-ivan

It is the expected behavior as it return an array of ID even if there is just one.

Then to “format” it differently, use a script like so (using JobInfo3):

Watch.SetJobInfo(3, Watch.GetJobInfo(3).Replace('[','').Replace(']',''));

Thanks for the answer, hamelj!

I still don’t see the reasoning behind the square brackets :slight_smile:

I cannot use the result right away in a workflow task (lookups). Maybe I’m missing something. Is there a use case, where the brackets play a role?

Best regards

-ivan

I can’t answer with certainty but my guess is that since arrays in Javascript are between square brackets and that the Connect Solution is based on Web language (HTML, CSS, Javascript, etc…), it was choosen for that reason…again, this is my guess.