Convert String var String Array

This ask is related to a previous post that has been marked as resolved so cant ask more questions on that one.

I have a String arg(out_myString) that when printed it does look like this:

my ask: This String arg(out_myString) must be stored in the variable “myArray” which is an String Array.

THE BIGGEST CHALLENGE IS ,when the variable myArray printed, it should still come out as below:

I have tried the Split function and other functions with no luck.
image

Here is my workflow, I’d appreciate any help.

convertColumnsToInClause.zip (12.0 KB)

Hi @Yomi_Oluwadara

Your query is quite confusing, could you be more specific.

Hi @Yomi_Oluwadara

Check the below zip file. I have made the required changes in the second Log Message as below syntax:

"Simple sol in String Arry = " + String.Join(", ", myArray)

convertColumnsToInClause.zip (95.6 KB)

Output:

Hope it helps!!

@Parvathy Thanks, for the insight.
Is it possible to manipulate myArray variable so that when its printed directly, its gives out the same output?. The goal is to make the variable print out the array.

I want the myArray variable to be able to print out the out_myString as an Array of String

Hi @Yomi_Oluwadara

As of my knowledge, you need to print the array variables this way only. There is no another way.

Regards

@Yomi_Oluwadara What kind of manipulation need to be done? and could you pls tell me more about that.

No because it’s an array not a string with { and } before and after it.

@postwick @Muthuraj_Chidhambaram1 and @postwick
Thank you all for the input.

Another potential approach that could work for my use case is to write the column from a data table and store in an array.

Currently, my work flow is doing this:
image

Would there be any other approches I can try?

Hi @Yomi_Oluwadara

The above syntax from the screenshots stores ID column of an datatable in an Array variable and you are using String.Join to print the array variable in Log Message or Message Box.

Regards

1 Like

Why are you trying to convert it to an array then back to a string? You already have it as a string. Just store it as a string in one variable and an array in another variable, and use them where each is appropriate.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.