Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

select set of dates in listbox

Hi All,

I would like to see set of dates in listbox (Date) get selected up on the selection of list of values of list box(Days).

If possible pls share it with a working example..with the sample data given below.

listbox(Date )        Listbox(Days)

01-01-2015             Past 2 days --- when this get selected it should Select....04-01-2015 & 03-01-2015

02-01-2015             Past 3 days --- when this get selected it should Select....04-01-2015 , 03-01-2015 & 02-01-2015

03-01-2015

04-01-2015


Thanx in advance

Regards

Krishna

24 Replies
Not applicable
Author

How do I can see your trigger action?

I didnt see any code in Document properties-> Trigger

Point me to Correct direction

Regards

Lathaa

Not applicable
Author

Hi Timanshu,

Does Triggers have any limitation on converted date formats...as I'm unable to get this as per my requirement.

Regards,

Krishna

timanshu
Creator III
Creator III

Hi Varun,

I am using trigger. If Duration is Selected, then trigger fires, which takes Dates from MaxDate - Duration +1 to MaxDate. Then I separate values by '|'  and put them in ( ) which is condition in trigger to select multiple fields.

example :-

Selecting Past 2 Dates :


MaxDate - Duration +1 gives 4/1/2015 - 2+1  -> 3/1/2015

to

MaxDate gives  4/1/2015

Final :

( 3/1/2015|  4/1/2015)

this will select 2 values in date  field

timanshu
Creator III
Creator III

Hi Krishna,

No there is no Limitation of Date formats. But You should refer a date field in  same format where ever used  as  they declared for correct comparison.

Attach qvw if it still does not resolve.

varunvarma
Contributor III
Contributor III

Thank you. I got it. 


Not applicable
Author

Hi Timanshu,

Please find the attached qvw..help me in resolving this ...

Regards

Krishna

timanshu
Creator III
Creator III

Hi Krishna,

You have to define Year too in Date Field to Make this work. Any Format of  Date but with All 3 parameters are acceptable.

Change the format in script to mention year and attach qvw. As I cant reload.

Not applicable
Author

Hi Timanshu, please find attached file... which is the source of qvw.....

Regards

Krishna

timanshu
Creator III
Creator III

Hi,

File and script are different.

Script;

LOAD Name as Job,

     Scheduled,

     [Start Time],

     [End Time],

     Status,

     [Avg RunTime],

     [42074],

     [42073],

     [42072],

     [42071],

     [42070],

     [42069],

     [42068],

     [42067],

     [42066],

     [42065],

     [42064],

     [42063],

     [42062],

     [42061],

     [42060],

     [42059],

     [42058],

     [42057],

     [42056],

     [42055],

     [42054]

.......

These fields are not in excel.

Not applicable
Author

Hi Timanshu,

When we load data from excel, the format of the date field is [42054], [42055],that is why I'm converting that particular fields to date format i.e to 19-feb, 20-feb..etc..using this function (Date(PurgeChar(Date,'[]'),'DD-MMM') ....the days get  added on day to day basis..If you load the data from excel..you will see the same fields... please let me know if you need anything more..

Regards

Krishna