|
I'm tracking projects (List of Projects) with multiple task items (List of Project Ref # and a dozen task items per). Each of the dozen tasks per project has it's own separate status field.
The status possibilities are: Critical [Worst] Advisory [Bad] Verified [Good] Created [Best]
I need to present the single record per Project Ref # with the worst status and/or earliest date. My plan was to sort on "Status" from Worst to Bad, then display the distinct row based on Ref # (should be first row after the sort above).
I have attempted several different ideas to force the sort order of "Status" using the "xsl:sort" function, but none are working.
Obviously, there is no 'natural' sort order. Values not alphabetical and have no numerical sequence. When I sort the rows based on this field, I can only get it to display as: Advisory Created Critical Verified
Can someone help me find the best way in a DVWP using XSL and/or a complex Xpath sorting expression to sort this way and then present the first record of each set of repeating "ref #"?
|