Hello all!
I am working on a dashboard with a BAQ returning a list of part numbers. I know that I can group the results in the grid by part number, but instead I want to color every other group of part numbers without using the grouping or group by. Since they are sorted by part number, the coloring can be just two colors. There can be one or more part numbers in the resulting list, and the color should alternate for every other unique part number.
I believe I need to accomplish this with something like a running total, or sum over partition. Ideally, a calculated field that switches between 1 and 0 for every other part number would let me assign the alternating colors in the dashboard view rules. I just cant figure out how to generate that calculated field!
I think that this post hits on exactly what I need I just am having trouble with the syntax.
One way to get a calculated field to use in your dashboard view rules could be to group up the parts in a subquery (same order as they will be displayed in dashboard), assign a row_index, do a modulo on the row indexes to turn it into 2 values (even/odd), then join these modulo’d row_indexes back with your non-grouped part list. Probably not the best explanation, and there may be an easier way, but this could work.
I messed around with this using the PartTran table. Here’s some pics.
This is an awesome example of extreme geekiness overlapping with actually caring about the user’s experience to produce something so seamless, no one would know it was not actually part of the system. Good job, smart people. I’m bookmarking this one.
I just want to point out though. That if anyone re-orders the grid on another field, those fancy bars won’t help. So for a lot of places, it just isn’t worth it, but it obviously depends on the application.