Filter Records on DateTime Fields in a List Page

navuser1navuser1 Member Posts: 1,329
edited 2017-09-15 in NAV Three Tier
Dear All,

I have a DateTime field in a List Page in NAV2016 Database. Now I want to filter the data on that Field.

Suppose I want to see the filtered records from 15/09/17 00:00 to 15/09/17 23:59.
But I would like to provide the (only) value 15/06/17 in the required field.

When I have given the input on that field to filter, it converts the value from 15/06/17 to 15/09/17 00:00. It does not convert the input value(15/06/17) into the range from 15/09/17 00:00 to 15/09/17 23:59.

How do I achieve it ?

Kindly reply.
Now or Never

Answers

  • YuryYury Member Posts: 59
    Hi
    15/09/17 00:00..15/09/17 23:59
    Regards,
    Yury
  • navuser1navuser1 Member Posts: 1,329
    User will provide only 15/09/17 on the DateFilter Field of the Page. And the System will automatically convert the value from 15/06/17 to 15/09/17 00:00..15/09/17 23:59
    Now or Never
  • YuryYury Member Posts: 59
    For standard filter possibilities of NAV list pages its impossible to convert input dynamically. You should add your own field (date or text) for such purposes, convert it to DateTime and apply to DataSource on OnValidate trigger
    Regards,
    Yury
  • navuser1navuser1 Member Posts: 1,329
    It is working fine in NAV2009.

    MS has enhanced(removed) the feature from old to new
    Now or Never
  • Slawek_GuzekSlawek_Guzek Member Posts: 1,690
    Hi,

    The text entered in date/time filter field is converted into filter expression in codeunit 1 in MakeDateTimeFilter function, which in turn calls MakeDateTimeFilter funcion in codeunit 41.

    You can try modifying that function to get what you need. Just be careful as it will affect the entire system, all places where a data/time filter is entered.

    Slawek
    Slawek Guzek
    Dynamics NAV, MS SQL Server, Wherescape RED;
    PRINCE2 Practitioner - License GR657010572SG
    GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03
  • navuser1navuser1 Member Posts: 1,329
    Hi,

    The text entered in date/time filter field is converted into filter expression in codeunit 1 in MakeDateTimeFilter function, which in turn calls MakeDateTimeFilter funcion in codeunit 41.

    You can try modifying that function to get what you need. Just be careful as it will affect the entire system, all places where a data/time filter is entered.

    Slawek

    OK. I don't want to hamper the default system.
    Now or Never
Sign In or Register to comment.