• Jeff Moden (12/28/2012)


    Steven Willis (12/28/2012)


    Here's the new splitter function as I tested it...I'm sure someone may be able to improve it even more.

    Very cool. Thanks for posting that code. Just remember that the second dimension can still only have 2 elements in this case.

    Yeah, while I was working on testing the new version I was thinking to myself how cool it would be if the function could allow any number of delimited values within "groups."

    For example:

    '12,34,56,78|12,78|34,56,78'

    or

    '12,34,56,78|12,78|34,56,78~56,67|34,23|67'

    I've had the misfortune to face such strings and splitting them can be a nightmare.

    I had one string to split lately that I had no control over that looked like this (and this is a simplified version:

    '{TeamIDs:[1,2|3,4|5,6|7,8]}

    ,{Scores:[88,70|90,56|67,70|88,87|45,52|78,77|81,70]}

    ,{Dates:[12/22/2012|12/22/2012|12/22/2012|12/22/2012|12/29/2012|12/29/2012|12/31/2012]}'

    The scores correlated to the results of each team pair AND each subsequent round of the bracket. No keys except the order of the data...which meant I had to figure out the winner of each round based on the score pairs to get the value pairs of each round so I could create an scheduled event for each game. :crazy:

    Then to make it worse, once I had the scheduled events I had to write a query to create a similar string to pass back to the application so it could display the bracket and game results. I used a coalesce function to "reverse" split the results. Perhaps some testing could be done on some "reverse" split functions?