How to select in a range ?

LBinDENMARKLBinDENMARK Member Posts: 33
Hi

I'm new into Navision, so i hope some one can help me.
I have tryed this :
IF FakturaHoved."Ship-to Post Code" = '0000..2400' THEN BEGIN.......
but no result. If i select just one postcode ex. = '2000' then it works fine. How do i select my postcodes in a range ?

Lars

Comments

  • bbrownbbrown Member Posts: 3,268
    Use either

    FakturaHoved.SETRANGE("Ship-to Post Code", '0000', '2400');

    Or

    FakturaHoved.SETFILTER("Ship-to Post Code", '%1..%2', '0000', '2400');

    The use FakturaHoved.FIND
    There are no bugs - only undocumented features.
  • Timo_LässerTimo_Lässer Member Posts: 481
    [...]
    I have tryed this :
    IF FakturaHoved."Ship-to Post Code" = '0000..2400' THEN BEGIN.......
    but no result.
    [...]
    Try this:
    IF FakturaHoved."Ship-to Post Code" IN ['0000'..'2400'] THEN BEGIN ...
    
    Timo Lässer
    Microsoft Dynamics NAV Developer since 1997
    MSDynamics.de - German Microsoft Dynamics Community - member of [clip]
Sign In or Register to comment.