Index was outside the bounds of the array!

image

I just do not get it! Why am i getting this error :thinking:

image

**

  • devicePrice = “95000-150000”

**

**

  • arr_devicePrices = devicePrice.Split({“-”}, StringSplitOptions.None)

**

image

Everything is okay in the immediate panel but i am getting errors when i run the file :thinking:

Do you have extra space chars in the expression in the assign in your screenshot? It looks like this:

devicePrice.Split({" - "}, StringSplitOptions.None)

remove the two spaces here

it works in immediate panel because you dont have spaces, but in your workflow you have spaces

It was removed already. I just wanted to add two spaces to try after getting errors again and again.

So normally there is no space :robot:

Try use
devicePrice.Split(“-“c)

can i get both of them anyway ???

for example ;

minPrice = 95000
maxPrice = 150000

Yes, the same way before

image

I have tried like this but i got the same error.

Also here is how i see in the queue :thinking:

Try without StringSplitOptions

arr_devicePrices=devicePrice.Split(“-“c)

Hi @170290064 ,

Could you maybe clean up your variables and arguments and check whether duplicate names are used for variables or arguments ? The Split is checked at our end and it does work.

If the Splitting part is happening in a Separate workflow, could you maybe share the screenshot of the whole workflow or if possible the workflow itself ?

Okay but after that how can i get them in different variables ???

It works perfectly fine if device type is television but interestingly i am getting error if its a computer or phone :thinking:

@170290064

Please check the values properly…looks like it is a data issue

Cheers

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