Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

sushil353
Honored Contributor II

Problem with input box used to enter date range

Hi Experts,

In my dashboard i want to provide a manual option to enter the date range... for that i have created two variable startdate and enddate

Then i took a inputbox and used these two variables with constraint

= /* $ represents the user entered date */

len(date(date#($)) > 0 /* Can be converted to a valid QV date? */

AND date#($) < date#(enddate)           /* Entered StartDate is less then the current EndDate? */

AND date#($) >= min({1} T_DATE)          /* Entered date is greater or equal to available dates? */

AND date#($) <= max({1} T_DATE)          /* Entered date is less or equal to available dates? */

but when ever i am trying to enter the date in the list box... variable is not taking values...

Can any body please telll me where i am wrong or share your experience to solve this problem..

Thanks

5 Replies
gandalfgray
Valued Contributor

Re: Problem with input box used to enter date range

Hi sushil

You have an syntax error.

There is a missing )

len(date(date#($)) > 0

should be

len(date(date#($))) > 0

hth/gg

sushil353
Honored Contributor II

Problem with input box used to enter date range

HI GG,

I have corrected the error but still it is not taking values... whenever i tried to enter the value it disappears and courser  remain in the inputbox..

gandalfgray
Valued Contributor

Re: Problem with input box used to enter date range

Hi

Yeah, I noticed that also, after my last post.

I suggest you put the different parts of your validation logic in textboxes and verify that they behave as you expect.

There may be an error somewhere, and it's easier to see if you can see the values of the different parts.

/gg

sushil353
Honored Contributor II

Problem with input box used to enter date range

one more thing i want to add...

i removed the constraint and then entered the value.... input box took the values...

but when i add constraint the the values which are added in the input box remains same... they are not able to change..when i am trying to change the date value  it hangs up there...

gandalfgray
Valued Contributor

Re: Problem with input box used to enter date range

Oh I made a mistake before but now I use

=len(date(date#($))) > 0

AND date#($) < date#(enddate) 

AND date#($) >= min({1} T_DATE)

AND date#($) <= max({1} T_DATE)

in the startdate input field, and

=len(date(date#($))) > 0

AND date#(startdate) < date#($) 

AND date#($) >= min({1} T_DATE)

AND date#($) <= max({1} T_DATE)

in the enddate input field, and it works as expected for me

If I enter an invalid date the cursor remains in the input field otherwise its ok

/gg

Community Browser