Options

C/AL: Setfilter (Nav. 2.6)

MarioPaulMarioPaul Member Posts: 2
edited 2002-03-04 in Navision Financials
Hallo,

I want to filter all date fields, were a date value is entered and the date is lower than a special value.

The correct filter is <>''&<01.01.2001

How can I do this in C/AL?

Setfilter(datefield, '<>''&<01.01.2001');

does not work.

Thanks
Mario

Comments

  • Options
    John_TegelaarJohn_Tegelaar Member Posts: 159
    When setting the filter from C/AL you have to provide the values in Date format.

    This will work:
    Evaluate(SpecialDate,'01-01-2001');
    setfilter(Date,'<>%1&<%2',0D,SpecialDate);

    "SpecialDate" is of course a variable of type Date.

    John
  • Options
    wonmowonmo Member Posts: 139
    Just as an addition, you can also simply use 010101D for the date and bypass the EVALUATE STATEMENT.
Sign In or Register to comment.