Hello everyone!
I’ve got this error in my workflow:
Two variables are set (string1 and string2) and both of them are string variables. Someone can help me see the problem in the logic?
Hello everyone!
I’ve got this error in my workflow:
Two variables are set (string1 and string2) and both of them are string variables. Someone can help me see the problem in the logic?
Can you please share the input and the excepted output. Let’s try
Hello @darshan.bp
Of which activity you’re talking about?
Welcome to the community.
It looks like the problem is with input String. Can you please share that with us? so that we can give you a resolution on that.
Thanks,
Aditya
Can you copy paste this String here in the section, we will take that and give you the expression.
Thanks
The error tells you the problem. You are referencing an index in the array that does not exist.
For example, if your array is {“Zero”,“One”,“Two”} then myArray(1) will return “One” but myArray(3) will give the “index outside bounds of array” error.
I’m guessing whatever you’re trying to do with that nested split, there’s a better way to do it. Show us the input and what you want the output to be.
“Meu nome é Guilherme Melato”
Hope this is it.
Thanks,
Also what is the expected output?
Hi @postwick
This is the default value of the variable string1:
“Meu nome é Guilherme Melato”
This is the value set in the asssign activity:
Split((Split(string1, " ")(3).ToString), "é ")(1).ToString
I want to the output to be only ‘Guilherme Melato’
The output would be just ‘Guilherme Melato’
Simply use
Split(string1, “é”)(1).toString.Trim
That would be all.
Perfect!
Thank you and have a nice day!
Hi @guilherme_melato
Try using the below syntax. I have shared the image for better understanding.
Hope this helps!!
Regards,
Will it always be “Meu nome é Name”?
Because then you could just do…
string1.Replace(“Meu nome é “,””)
This is exactly what I wanted; a double split.
Thank you very much @Parvathy
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.