6 Replies Latest reply on Jan 21, 2008 10:17 AM by (Paul_Taylor)

    Nextensio list filter by date range - PHP

    Level 1
      My client likes the addt/nextensio list filters

      first thing he asked was - how do I filter by date range? ( ie 1-6-2007 to 31-1-2008)

      the date part of the filter seems to be hard wired as an '='

      appreciate feedback (PHP)

      Paul
        • 1. Re: Nextensio list filter by date range - PHP
          Günter Schenk Level 4
          Hi Paul,

          as far as I know, you´ll need to create that Dynamic List from a recordset -- and a custom query is generally able to reference e.g. one date_column twice by introducing "alias" columns, example:

          "SELECT date_column AS date_one, date_column AS date_two..."

          ...where the alias columns "date_one" and "date_two" would be what you´d have to use as separate input fields in your Dynamic List.

          Once this has been set up, your customer will apparently have to use the ADDT´s filter conditions explained in the MX Kollection tutorial "Filter dynamic data: NeXTensio list filters":

          http://www.interaktonline.com/Documentation/MXKollection/#04532a_filter_dynamic_data.htm

          I personally have never done that so far, but this seems to have worked with MX Kollection, so I reckon it will also work with ADDT.

          Cheers,
          Günter Schenk
          Adobe Community Expert, Dreamweaver
          • 2. Re: Nextensio list filter by date range - PHP
            Level 1
            Hi Günter

            thanks for the pointer (and good to speak to you after all this time). I'll take a look.
            So far I've tried a custom query - just can't seem to wire it into the form correctly (also filter by date is always filtered as = if you echo the filter query) anyhow, maybe the article you mention will shed some light

            I had the feeling Brad had done this before - but haven't been able to get in contact

            regards

            Paul

            PS any news on the ADDT roadmap
            • 3. Re: Nextensio list filter by date range - PHP
              Günter Schenk Level 4
              Hi Paul,

              just saw that the MX Kollection tutorials I mentioned has also been integrated into the ADDT help :: Display Dynamic Data -> Back-End dynamic lists -> Filter Dynamic Data: Dynamic List filters.

              That said, it seems that the same functionality to (apparently) override the default "=" filter condition with a variety of operators has been ported to ADDT.

              -----
              I had the feeling Brad had done this before - but haven't been able to get in contact
              -----

              yes, I just read some related posts by Brad on the Interakt forums. Let me try contacing him and see what happens...

              -----
              PS any news on the ADDT roadmap
              -----

              not that I know of, sorry. But there ain´t no use in asking us Community Experts, because we folks aren´t getting informed about that stuff either.

              Cheers,
              Günter Schenk
              Adobe Community Expert, Dreamweaver
              • 4. Re: Nextensio list filter by date range - PHP
                Günter Schenk Level 4
                Paul,

                I´ve just done some tests, and it´s fairly easy when you´re comparing two separate date columns -- what seems impossible with ADDT, is to compare two alias columns from a recordset.

                What´s *your* approach ?

                Cheers,
                Günter Schenk
                Adobe Community Expert, Dreamweaver
                • 5. Re: Nextensio list filter by date range - PHP
                  Günter Schenk Level 4
                  Hi Paul,

                  ----
                  what seems impossible with ADDT, is to compare two alias columns from a recordset
                  ----

                  well, I have just succeeded to do just that :-) Will tell you more soon, and maybe provide a tutorial

                  Cheers,
                  Günter Schenk
                  Adobe Community Expert, Dreamweaver
                  • 6. Re: Nextensio list filter by date range - PHP
                    Level 1
                    Hi Günter,

                    off the top of my head...

                    I started looking at (PSEUDO CODE)

                    adding another text field to the filter row name:todate
                    pick up the $_POST['todate']
                    add to the QUERY statement .....WHERE {NXFILTER} AND (datecolumn <= $_POST['todate'] AND datecolumn >= Nextensiolist_datefield

                    another problem - the date fields is already checked in the NXFILTER

                    didn't get much further

                    atb

                    Paul

                    Will be back on this tomorrow - appreciated any further thoughts