Options

Date Filter

ruanruan Member Posts: 3
Goodday to all,

I have a Navision 3.70 A problem. I have a custom created table with a few fields. 5 of them is decimal flowfields that sum a decimal number in another table.
Background to my problem: I have 2 fields that must work on different date filters (1 eg. where 'Start Date' is smaller than a calculated date field, and 2 eg. where 'Start Date' is greater than workdate).
Now, I have a Date filter field and it is assigned in the calcFormula property, but Navision dont accept <>.. characters in the filter (type field) and dont accept the Date Filter field in the filter (type filter) in calcFormula's Table filter.

Can and how do I set the date filter in C/AL to work for both flowfields with different date filters? And do I need 2 Date filter fields?

Thank you.

Comments

  • Options
    jmjm Member Posts: 156
    Hi ruan,

    you can do:
    SETFILTER(DateFilter,'<%1',CalcDateField);
    CALCFIELDS(Field1);
    SETFILTER(DateFilter,'>%1',WORKDATE);
    CALCFIELDS(Field2);
    
    br
    Josef Metz
    br
    Josef Metz
  • Options
    ruanruan Member Posts: 3
    Thanks so much, kinda forgot about that.

    Note: Because it's flow fields, the drill down on the first field show incorrect because the filter was changed after it was calc'ed.
  • Options
    jmjm Member Posts: 156
    Hi ruan,
    ruan wrote:
    Note: Because it's flow fields, the drill down on the first field show incorrect because the filter was changed after it was calc'ed.
    Then you have to use 2 DateFilter fields.

    br
    Josef Metz
    br
    Josef Metz
Sign In or Register to comment.