2 Replies Latest reply: Jun 21, 2013 5:40 PM by Steve Lord RSS

    Input Box for Dummies question

    Steve Lord

      Hi, I have been reading about input boxes and have an idea what input boxes need but not how to make them functional.


      I have lots of data and one field called TestDate


      I want want inputbox to specify a minimum TestDate to show and another inputbox to specify a maximum TestDate to show.


      So if I put 9/1/2012 in one inputbox and then 9/22/2012 in the other, my tables show only items from dates 9/1 - 9/22 (for whatever ficticious reason).


      I know well how to get days weeks months and years onto listboxes and such, but am planning to use input boxes to pull various misshapen date ranges around various events' start/end dates.


      Input boxes would be for end users on a web portal to enter start/end dates and pull a list of records/data related to that date range.




      PS> I'm using personal edition of qlikview so can't read other people's QVWs.  Please post script text and some explanation to body of the reply.  Thanks again!

        • Re: Input Box for Dummies question
          Michael Solomovich

          Hi Steve,


          Input box shows a value of a variable, and may allow to change it.  It has nothing to do with the fields at all.  That means, if you want input boxes to affect charts, you have to use the input box variable values as conditions in chart expressions.
          For example, you have field Date, and input boxes for MaxDate and MinDate.  You can have expressions like this:
          only(if(Date>=MinDate and Date<=MaxDate, Date))
          sum(if(Date>=MinDate and Date<=MaxDate, Amount))
          count(distinct if(Date>=MinDate and Date<=MaxDate, ID))


            • Re: Input Box for Dummies question
              Steve Lord

              Dude!  So you just make some whatever variablename in manage variables or while creating input box, then put that variablename in the formula of an expression on whatever chart for whatever field to look at its value.


              I just copypasted that MinDate MaxDate expression into a straight table with company, userid, testdate, testresult, and that expression (superficial change of Date to TestDate to match the fieldname on my side).  Then I made the two variables, made the two input boxes for the two variables, punched in the dates and watch the chart hop to.


              So now I’ve learned the input boxes merely give the hint of what is happening in the expression to plug something in rather than dictate how the expression works.  I can write expressions frontwards and backwards, just didn’t understand the mechanics of the input boxes’ link to the other objects. ☺