Method Community

 

Grid filter not working on SQL overridden field

Last post 10-19-2017 7:40 AM by russg00. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 09-26-2017 9:32 AM

    Grid filter not working on SQL overridden field

    Hi,

    I recently took over modifying our CRM and have run into an issue when trying to do a grid filter on a field that has been overridden with SQL.

    SELECT DATEDIFF(DAY, viewPartsRequest.SoldDate, GETDATE())

    This seems to return a simple integer like value, but when filtering on any value other than 0 or 1 (which does not return accurate results), the grid returns 0 records.

    Any recommendations?

    Thank you!

  • 09-26-2017 4:41 PM In reply to

    Re: Grid filter not working on SQL overridden field

    Hey, 

    Have you tried altering the query to check for the current UTC date ( GETUTCDATE() instead of GETDATE() )?

    What kind of values are you expecting for this query? Is there typically meant to be more than a days variance between "SoldDate" and todays date? Let me know what you are trying to accomplish here and we can come up with a solution


    best, 

  • 09-27-2017 7:51 AM In reply to

    Re: Grid filter not working on SQL overridden field

    Hey Sammy,

    Thanks for the reply.

    The query is actually working just fine, it was in place before I started working on Method. It returns an integer which is the difference of days between our SoldDate and the current date.


    The real issue is that we cannot filter on the field in the grid. I can see that there are rows in the grid with a value of 2, but if I filter for 2, the grid returns 0 results.

    Let me know what you think.

  • 10-19-2017 7:40 AM In reply to

    Re: Grid filter not working on SQL overridden field

    Still have not found a solution to this, anyone have any suggestions?

Page 1 of 1 (4 items)