Alpha Video Training
Results 1 to 8 of 8

Thread: Filtering Web Project Grid view by date (Please Help)

  1. #1
    Member
    Real Name
    Fernando Cruz
    Join Date
    Jun 2019
    Posts
    27

    Default Filtering Web Project Grid view by date (Please Help)

    I have setup a grid web project from an SQL database that has multiple date fields. Drop Date, Date Due, etc. Is there any way to filter by Drop Date. What I need to accomplish is, to show ONLY jobs with Drop Dates for 5 previous days from today and 15 days in advanced. For example, if I were to view my grid today, I would only see jobs from July 27th and August 16th.

  2. #2
    Member
    Real Name
    Fernando Cruz
    Join Date
    Jun 2019
    Posts
    27

    Default Re: Filtering Web Project Grid view by date (Please Help)

    I have gotten no responses. But no problem I figured it out. If any one needs help with a similar issue send me a message and I will explain what I did.

  3. #3
    "Certified" Alphaholic CharlesParker's Avatar
    Real Name
    Charles Parker
    Join Date
    Dec 2012
    Location
    New Orleans, LA
    Posts
    2,117

    Default Re: Filtering Web Project Grid view by date (Please Help)

    just post it if you do not mind. I would like to see your solution. Personally I made a button to perform something similar then in OnrenderComplete I put {dialog.object}.buttonClick('BUTTON_109'); to run the button. The button itself actually displays a dropdown message and the OK button will then run the code to filter the agenda for the day, cancel just displays the events in the lists Order I set by date. Might be nice to offer a button to load the events for the last 5 days, or perhaps the current work week
    NWCOPRO: Nuisance Wildlife Control Software My Application: http://www.nwcopro.com "Without forgetting, we would have no memory at all...now what was I saying?"

  4. #4
    "Certified" Alphaholic
    Real Name
    Gregg Schmidt
    Join Date
    Mar 2001
    Location
    Milwaukee
    Posts
    1,388

    Default Re: Filtering Web Project Grid view by date (Please Help)

    Using MySQL, the query would be something like
    Code:
    select * from table where dropDate between curdate()-interval 5 day and curdate()+interval 15 day
    For MS Sql, it would resemble
    Code:
     SELECT dropDate
    from table
    where dropDate between dateadd(day,-5, DATEADD(dd, 0, DATEDIFF(dd, 0, GETDATE())) ) and dateadd(day,15,DATEADD(dd, 0, DATEDIFF(dd, 0, GETDATE())) )

    As a side note, I am using an old version of MS-SQL (I think version 8) which explains why I'm not using current options.

  5. #5
    "Certified" Alphaholic CharlesParker's Avatar
    Real Name
    Charles Parker
    Join Date
    Dec 2012
    Location
    New Orleans, LA
    Posts
    2,117

    Default Re: Filtering Web Project Grid view by date (Please Help)

    is there a way to refresh an existing list with an alternate sql query such as the ones you posted as opposed to the one the list was originally called with?
    NWCOPRO: Nuisance Wildlife Control Software My Application: http://www.nwcopro.com "Without forgetting, we would have no memory at all...now what was I saying?"

  6. #6
    "Certified" Alphaholic
    Real Name
    Gregg Schmidt
    Join Date
    Mar 2001
    Location
    Milwaukee
    Posts
    1,388

    Default Re: Filtering Web Project Grid view by date (Please Help)

    Hi Charles

    It should be doable, you just have to determine what is going to trigger the update.

  7. #7
    "Certified" Alphaholic CharlesParker's Avatar
    Real Name
    Charles Parker
    Join Date
    Dec 2012
    Location
    New Orleans, LA
    Posts
    2,117

    Default Re: Filtering Web Project Grid view by date (Please Help)

    well, for instance how would you trigger it via a button click?
    NWCOPRO: Nuisance Wildlife Control Software My Application: http://www.nwcopro.com "Without forgetting, we would have no memory at all...now what was I saying?"

  8. #8
    "Certified" Alphaholic
    Real Name
    Gregg Schmidt
    Join Date
    Mar 2001
    Location
    Milwaukee
    Posts
    1,388

    Default Re: Filtering Web Project Grid view by date (Please Help)

    the basic process is click button, use xbasic to perform new query, use xbasic/javascript to adjust the grid.

Similar Threads

  1. Trouble filtering a grid by date
    By Mike Reed in forum Mobile & Browser Applications
    Replies: 8
    Last Post: 10-16-2017, 12:35 PM
  2. Filtering a Grid by Date Values
    By RIckyRel in forum Application Server Version 11 - Web/Browser Applications
    Replies: 2
    Last Post: 12-29-2012, 02:58 PM
  3. filtering a view for date fields only
    By willobeth in forum Application Server Version 9 - Web/Browser Applications
    Replies: 0
    Last Post: 06-15-2009, 11:30 AM
  4. Filtering By Date In a Grid
    By Phil Rolf in forum Application Server Version 8
    Replies: 3
    Last Post: 08-18-2007, 03:20 AM
  5. Replies: 0
    Last Post: 05-07-2007, 08:22 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •