List get item at index fails

Most nodes will fail this way when given an empty list as the first item. It’s always best to clean your data or account for the issue as you go.

3 off the top of my head options to deal with the bad data:

  1. Use a List.Map method or a Function.Apply method to force the full list to process despite the error. Careful as someday this could suppress a “stop the presses” warning you would want surfaced.

  2. Build up the list by adding value which will fail but will ensure continued processing via forcing List Levels, a String may work in this case. Careful as this is effectively ensuring a warning in all cases.

  3. Add a list of [0] and an index of 0 to the larger data structure, ensuring the first attempt at ItemAtIndex always has valid input, and then remove the resulting initial zero from the result. Careful as this could become a repeat process that will slow the graph down on big data sets by adding new lists into the memory.

  4. Revisit the larger structure of the graph and/or workflow. Hard to know how much this would entail with the data given. This is likely the most likely but will also require the most soul searching on your end (both for you and anyone else who may be consuming the workflow).

3 Likes