Announcement

Collapse
No announcement yet.

How filter grid data based on additional search field

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • How filter grid data based on additional search field

    Hello,
    I got a grid with a search on top . Only on search fields I added a field i.e. (due_days_to_add ) as integer .
    How can use it correctly to make the search based on a field date + that integer value ? For instance {due_date} = date("Y/m/d") + {due_days_to_add}.

    I did this code below within "Search" --> Events --> onFilterValidate but nothing happens... Is there a more brilliant solution ?

    if (isset({due_days_to_add}))
    {
    sc_select_where(add) = "where {due_date} = " . date("Y/m/d") + {due_days_to_add};
    }

    How can I understand that the field i.e. {due_date} is that one on Search area and not that one of grid ?
    I'm confused....
    Attached Files
    Last edited by giovannino; 03-06-2019, 03:45 PM.
Working...
X