Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have one text object and planning to display one bulb in it.
Now my challenge is
when i am selecting one date in calender then it needs to check the duedays dimension value.
If duedays value is < 10 days then my bulb needs to show green color
If duedays value is = 10 days then my bulb needs to show orange color
If duedays value is > 10 days then my bulb needs to show red color
My duedays dimesion as below
duedays
< 10 days
= 10 days
> 10 days
This is highly appreciated.
Please advise.
Thanks,
Durga
Hi durga,
Please see the attached qvw.
Hope this helps or let me knowif I m missing something
script is:
expression of the text box
=if(Due<10,'qmem://<bundled>/BuiltIn/led_g.png' ,
if(Due=10,'qmem://<bundled>/BuiltIn/led_o.png',
'qmem://<bundled>/BuiltIn/led_r.png'))
Hi Durga,
something like the simple example attached, which shows a different color text box based on the seletion
Andy
Hi,
Please find attached file for solution.
Regards,
Jagan.
Hi Andrew and Jagan,
Sorry to say this. I have no access to qvw files in office due to security reasons.
Please share screenshots.
small change in my requirement. Please find below.
when i am selecting one date in calender then it needs to check the duedays dimension value.
If date contains only duedays value < 10 days then then my bulb needs to show green color
If date contains only duedays value = 10 days then then my bulb needs to show orange color
If date contains duedays value > 10 days then my bulb needs to show red color.
Finally if date is not selected by default bulb no need to show color.
My duedays dimesion as below
duedays
< 10 days
= 10 days
> 10 days
This is very helpful for my dashboard.
Waiting for reply.
Thanks,
Durga
Hi,
Try like this
Data used:
Data:
LOAD * INLINE [
Date, Due
1/1/2015, 8
1/2/2015, 12
1/3/2015, 10
];
Expression in Text object:
=If(GetSelectedCount(Date) = 0, Null(),
If(Sum(Due) > 10, 'qmem://<bundled>/BuiltIn/led_g.png',
If(Sum(Due) = 10,'qmem://<bundled>/BuiltIn/led_o.png',
If(Sum(Due) < 10, 'qmem://<bundled>/BuiltIn/led_r.png'))))
Now: Text Object Properties -> Select Representation as Image.
Regards,
jagan.
Hi,
Write the expression in the textbox as
=if(Duedays<10,'qmem://<bundled>/BuiltIn/led_g.png',if(Duedays=10,'qmem://<bundled>/BuiltIn/led_o.png','qmem://<bundled>/BuiltIn/led_r.png'))
and select Image in the representation dropdown
see the attached inline
@Jagan: I am not getting changes in text object when i am selecting the date.
@Ankitha: I implement same thing as you said if i want to display the bulb based on only duedays.
but here my requirement is to display the results based on selected date. Here i am giving clear requirement. Please advice.
when i am selecting one date in calender then it needs to check the duedays dimension value.
If the selected date contains duedays value "> 10 days" (i.e may be it also contains "< 10 days","= 10 days") then my bulb must show red color.
If the selected date contains only one duedays value "< 10 days" then then my bulb needs to show green color
If the selected date contains only one duedays value "= 10 days" then then my bulb needs to show orange color
Finally if date is not selected by default bulb no need to show color.
My duedays dimesion already present in my dashboard as below
duedays
< 10 days
= 10 days
> 10 days
This is very helpful to my dashboard.
Durga
Hi durga,
Please see the attached qvw.
Hope this helps or let me knowif I m missing something
script is:
expression of the text box
=if(Due<10,'qmem://<bundled>/BuiltIn/led_g.png' ,
if(Due=10,'qmem://<bundled>/BuiltIn/led_o.png',
'qmem://<bundled>/BuiltIn/led_r.png'))
Yes got it, you missed small thing. Suppose if no date is selected then bulb no need to show color. (i.e some light color)
Please advice.
Waiting for reply.
Durga
Hi,
Write the expression as
=if(GetFieldSelections(Date)>0,if(Due<10,'qmem://<bundled>/BuiltIn/led_g.png',
if(Due=10,'qmem://<bundled>/BuiltIn/led_o.png','qmem://<bundled>/BuiltIn/led_r.png')),
'qmem://<bundled>/BuiltIn/led.png')