How to fix this assign activity error?

i am trying to run UiPath validator but i got this error
error

from this activity

Hi @imumeriqbal

  1. Array Length Issue: The most common reason for this error is that you’re trying to access an element of an array or collection at an index that doesn’t exist. In your case, it seems to be related to splitting a string. Make sure that the array resulting from the Split method has at least as many elements as you’re trying to access.
  2. Invalid Index: Check if the index you are using to access an array or collection is valid. Array indices in most programming languages are zero-based, meaning the first element has an index of 0, the second has an index of 1, and so on. Ensure that you’re not using a negative index or an index greater than the length of the array.
  3. Empty or Null String: If you’re splitting a string, make sure that the input string is not empty or null. Attempting to split an empty or null string can result in this error.

@imumeriqbal

The element which you are accesing does not conatin in that array

Can you check with your array length and the index of that assign

@imumeriqbal

  1. Please correct the inverted comma as per screenshot they look wrong…please remove and readd
  2. The error ypu are getting is index out of bound means you are trying to access an array where it does not have any element at the index you specified
  3. Does you filename contain =? …It is failing be ause as per your case filename should contain equals symbol and it does not have it
  4. Its better to first check if = exists and then split .path.GetFilenamewithoutextension(path).Containd("=") this can be used to check which returns true if present else false…us ethis in if condition have split only on the then side

Hope this helps

Cheers