5 Replies Latest reply on Oct 5, 2007 2:54 PM by Dan Bracuk

    Compare and Sort a List

      I have this list called productColors:
      <cfset productColors = "White, Translucent, Slate, Sand, Moss, Merlot, Latte, Black">

      And, I have a dynamic list that is not sorted correctly and is a subset of the list above.
      So, it might look like this:
      "Latte, Black, Sand"

      I'd like to end up with this list sorted like the one above:
      "Sand, Latte, Black"

      How might I write a function to do this?