Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

To grey out a particular day in calender Object

Hi Guys,

my requirement is someething like this..

I have calender object, if there is no data in the table for a particular day ,user will not be able to select the same day from calender.

The day should be grey'd out..

Can Anybody suggest a solution for this..

Thanks in advance

7 Replies
Not applicable
Author

Hi praveena,

i have faced the same problem. but what i have done for this is ..

i think we cant touch the calendar Object`s internal properties. so that, when the user selectes a particular date and clik on select button, then i checked, is the selected calendar date`s data is available or not in our data. if its not available, then i should do visible a text object which displays like," data is not available for the selected date".

so, try like this..

Not applicable
Author

Hi Arun,

Thanks for your quick response..How did you check the avalability of data in the table.

Also when do u trigger the text object..

Can you share the qvw file if possible

Not applicable
Author

Hi praveena,

Sorry, due to security reasons, am unable to send the file. but i will tel u how to make it.

Step 1: Take a TextObject and write the message " data is not available for the selected date" in TEXT in the GENERAL tab.

Step2: Goto LAYOUT tab, select the Custom radio button in the layer area and make it as 2

Step3: in the Layout tab itself, select the Conditional radio button in the Show area and write like.. " =not FieldIndex('datefield',CalendarDate)"

here dateField is the field in our tablebox,

CalendarDate is the name of the field, which works under our calendar object.

now, if u select a date in the calendar, immediatly the text object visible, if the date is not available in our table box. try it now...

Not applicable
Author

Hi,

If ur going to join the Calendar table with a particular Table then you can use the join type - left keep

Fact:
Load
-
-
from Fact;
Left Keep(Fact)
Calendar:
Load
-
-
From Calendar;

So the dates which are not having any data in the fact table will get filtered out automatically and in the date filter only the dates which are having data in the fact table will be displayed.

Not applicable
Author

Hi Arun,

Field in my table is tsr_from_dttm and in the calender i m using a varible named Date_From_All

Expression will be like

"=FieldIndex(tsr_from_dttm,Date_From_All).."

I dont see any NotFieldIndex function in qlikview

Is something is wrong in the above expression ?

Becz its not working as u said

Not applicable
Author

Hi praveena,

Function name is FieldIndex()

i just put not infront of this, as per our requirement.

write the condition like this..

= not FieldIndex('tsr_from_dttm',Date_From_All)

no need to write " to the condition. put the field name in single quotation and write the variable name as usal.

read about fieldindex() in the help. then you will get more...

Not applicable
Author

Hi Bandariarun,

I also want the same requirement as Praveena,However when i am using your logic It is not working for me.

This is the expression i am using in text box inconditional layout

=

Not FieldIndex('date',Date)

where "Date" is the field i am using in calender which has data for only one day in a particular week so if the user selects any other day in a week in calender object message should appear.

Regards

Murali Krishna