List Index Bug

I am trying to find the index of the highest value within a list, but am returned with -1 (value does not exsist in list).  If inserted though a list item the list index returns the correct value.  I have asked others but was told it is a bug.   (screen shot attached.) Thanks for the help.
  • up

    David Rutten

    Hi John,

     

    forget List Index, it doesn't do what you think it does.

     

    Try the following. Sort an array of index numbers in parallel with the values, the first item represents the lowest index, the last item the highest index:

     

    --

    David Rutten

    david@mcneel.com

    Poprad, Slovakia

    • up

      Danny Boyes

      It's not a bug. You need to compare like for like for the Item Index to work. In this example I've got a method for finding the maximum value to find in the list (which fails) and the Actual Item itself to find in the list which is 23.

      The difference between this and the Sorted method you used is the Actual list output rather than the K values.

       

      EDIT: Or go with David's

      2