Thursday, May 27, 2004

Using Dynamic Code Coloring

Just had a support call with a customer who wanted to highlight a single field with different colors based on multiple conditions. For example, if the shipment was late, it should be highlighted in red ; if it was to be delivered in the next 3 hours, highlight it in yellow. If to be delivered today, in green otherwise leave it
 
How do you do this? With Dynamic color coding, included with Horizon Dispatch.
 
The service is called COLCODE.SVC. Documentation is online at http://www.mtihorizon.com/documentation/doc439.asp.
 
Anyways, the problem is that Dynamic Color coding expects that you want every row to be the same, so the default expression put into DynamicBackColor expression in the Customizer reads COLCODE("RUN","DRIVER").
 
In this case, we wanted some conditions to be used for ONE set of columns (delivery date) and another set of conditions to be used for another set of columns (Driver,tractor, trailer). How did we accomplish this?
 
We changed the alias in Dynamic Color Coding to be unique for each set. So one said DRDATE and another said DRINFO and another said DRIVER.
 
The tricky part (and one that has been passed onto Development to make it easier to do) was to change the DynamicBackColor expression in the Customizer to say
COLCODE("RUN","DRDATE") or COLCODE("RUN","DRINFO") instead of the default DRIVER field.
 
Once that was done, it worked really well!
 
And it's not hard at all. Check out the screen shot above.

0 Comments:

Post a Comment

<< Home