Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

QlikWorld 2022, LIVE in Denver CO., May 16-19, 2022. REGISTER NOW TO RECEIVE EARLY BIRD PRICING
Showing results for 
Search instead for 
Did you mean: 
Not applicable


Hi to All,


Help needed  to me from you in my requirement.

Below you can found my explanation.

I have attached my Qvw file with this post.

if Startdate,Time is selected from First Inputbox and Enddate,Time is selected from Second Inputbox and click the button then the system will display respective LotNos (Lot Numbers) along with minimum of LotDateTime.It will display all the LotNos’ and minimum of Lot start date from the Table for the selected date range. The user can select only one lot no from the “Lot Start” and “Lot End” list boxes.After selection of lots from both LotStart and LotEnd Listboxes then click on LotRange button,

The system will query the database(Table) for all the lots within LotDateTime column available in the lot start and lot end list boxes. The user can select only one option for lot start and lot end list boxes and also the system will have the validation on lot start date for lot start will be lesser than that of  lot end list box. This feature allows the user to select the lot range for eliminate rows from the Table.

If the user selects lot range then the  date range filter will be removed and lot start date range filter will be applied. If the user selects date range filter once again then lot range filter will be removed and capture date filter will be applied to the dataset(Table).

The selected filter will be visible to the user in current selection box.

I Think you undersatand my explanation.If you require any information regarding my requirement reply me.


16 Replies
Not applicable

Hi Dennnis,

Thanks for your reply,

Your code is working well in another system Because i am not able to open your file(what you sent) in my system.

The same thing I have applied in my file but i am not achieving the result exactly like you.

I am attaching my file with what you suggested me to do and not able to get exact result.

Please check where i am wrong and let me know.



Good morning,

You are on the right way.

The problem is still your format.

You have to realise that if you want to make a selection the variabel must be exacly the same format as the field you want to make your selection on.

The first thing I do when I work with variables is make them visuable.

You can do this by creating a new input box and select vEnd and vStart

As you do this, you can see these are empty in your file, this means something is wrong there to start with.

(this way you are using empty variables in your marco)

I got you last Qlikview file to work by change the following:

1. There must be a space in between the 2 qoutes in you variable:


=Num(vStartDate &' '& vStartTime)

is stead of:

=Num(vStartDate &''& vStartTime)


=Num(vEndDate &' '& vEndTime)

in stead of:

=Num(vEndDate &''& vEndTime)

You need this because the original datefield also has that space between date and time

2 Go to your inputboxes and change the formats of your variables (number tab) in to the same format as the orignale datafield, which is the following:

vStartDate    Date           DD-MM-YYYY

vStartTime    Time           hh:mm:ss

vEndDate     Date            DD-MM-YYYY

vEndTime     Time           hh:mm:ss

Now fill the input boxes again in the right format and now you will see in your new inputbox that the variables are shown.

Add the field DataNum to your sheet so you can see that the format of your variables is the same as the format in your DataNum field. If so then the marco will work.

Let me know if this works, ok?

Good luck.

Not applicable

Hi Dennis,

Once Again Thanks for your reply,

I made changes to the variables vStart and vEnd by providing single space between quotes and also in the macro.But It is not working .

I am attaching my file with this post and check why it is not working.

Please ,let me know by your reply.



Your dashboard is right

Just add seconds to your time and it works.

Like I said the format must be the same so if your datafields has seconds your input field also needs to have seconds. (hh:mm:ss)

let me know if this works ok?

Not applicable

Hi Dennis,

I have done the changes of what you told in your latest post still it is not working.

Here i am attaching the file what you sent me,after adding macro it isworking fine .Please check this you didn't do any modifications here,but it is working .

Let me Know where should change required exactly.



Sorry I don't understand, you say that it is working fine, it does here too.

So what is your question?

Not applicable

Hi Dennis,

Thank you Very Much and You are Too Good.

Now i Got the clear Idea and My file also working well.But a bit confusion is there to check the validations based on time also.

Is it possible to consider only (HH:MM) in Time. and also a problem happens like after clicking of DateRange button The respected Lots are displayed only on LotStart Listbox.

can we show that to effect in LotEnd ListBox also..

Let me know .