Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Have a timestamp that I need to apply a 'stoplight' image to in a Straight table- not sure if its easier to apply an image or change the expression to a Traffic Light Guage- either will work fine.
Field & Data:
Reconciliation Time = '10:00 AM CT
Stoplight Criteria
<12:00 PM CT = Green
>12:00 PM CT and <2:00 pm CT = Yellow
>2:00 pm CT = Red
This expression is delivering the Green and Red,some of the Yellow, but not all the Yellow.
=if([Reconcilation Time]<'12:00 PM CT','qmem://<bundled>/BuiltIn/led_g.png',
if([Reconcilation Time]>'12:00 PM CT'and [Reconcilation Time]<'2:00 PM CT','qmem://<bundled>/BuiltIn/led_y.png',
if([Reconcilation Time]>'2:00 PM CT','qmem://<bundled>/BuiltIn/led_r.png')))
I not sure how to configure a Traffic Light Guage to render the same results
Dan
If you replaced within the if-loop the returning from qmem-pictures with 0, 1, 2 you could use them for gauge-segments.
- Marcus
Marcus,
I got it switched over to a gauge -segments,- thanks!
But it is still seeing '1:00 PM CT' as a 0 and applying the Green light.
Dan
I assume the reason is your used format for the times which is maybe not always the same and/or always numeric. Perhaps you could change it to another time-format, perhaps with 24 hours. But better is by all matchings and calculations from dates and times to use direct numeric values like:
num([Reconciliation Time]) < 0.5 // is 12:00
- Marcus
Hi DataNibbler,
it could be that the restriction is on the variable itself and not on the inputbox like the OneAndOnlyOne option for the listbox which restricted the field and not the listbox.
I seems that your task it's quite difficult. Maybe you could two different variables for the user input and a third one decided which wille be applied. Or if your user use the IE or the fat-client you could try to manipulate the user input with macros, perhaps in this way:
set v = ActiveDocument.Variables("Variable1")
v.ForceContent "123",123
- Marcus