While using the split function getting error(One dimensional array cannot be converted to string)

I am trying to get the order Id from the below page,

image

While using assign activity to split the text am getting the error, 1 dimensional array cannot be converted to string

image

can anyone please help me to fix this issue?

Thanks!
Jose

Hi @shajanjose,

strvalue="Order number 60003946 saved"
strOrderNumber=strvalue.Split(" ".ToCharArray())(2)

if you are splitting the string variable you need to put some condition to identity from based on what character need to split.

if you use split function it will return the array value.
For example

string s = "there is a cat";
        // Split string on spaces.
        // ... This will separate all the words.
        string[] words = s.Split(' ');
        foreach (string word in words)
        {
            Console.WriteLine(word);
        }

Refer this link

Regards, Arivu :slight_smile:

Try

str.Split(" ".ToCharArray())(2)

Maybe it works.

1 Like

Thanks Honoka, this solution is working :slight_smile: