Need a help in a filtering of information...

BeckaBecka Member Posts: 178
Hi all.. :mrgreen:

I need to filter a table... For example i need to filter table by words in which there's 'X' symbol, and in second case by words in which there's no 'X' symbol... If any ideas just help me :)

thanks to all :mrgreen:
MCSD
Attain Navision

Answers

  • JedrzejTJedrzejT Member Posts: 267
    HI,

    1 case
    Words with X symbol
    Filter:
    *X*

    2 case
    Words without X symbol
    Filter:
    <>*X*

    Second one work only on SQL Server option.
    We cannot use wildcards (*) with excluding filters (<>) in native databse.
  • BeckaBecka Member Posts: 178
    nope.. i need to filter it from C/AL code..
    MCSD
    Attain Navision
  • tinoruijstinoruijs Member Posts: 1,226
    record.SETFILTER(field, '*%1*', 'X');

    Tino Ruijs
    Microsoft Dynamics NAV specialist
  • garakgarak Member Posts: 3,263
    YorRecord.setfilter(YourFieldToFiler,'@*%1*','x'); <- these shows all Records where in YourFieldTofilter is an x (@ <- not case sensitive)

    YourRecord.setfilter(YourFieldToFiler,'<>@*%1*','x'); <- all record, without an x

    Regards
    Do you make it right, it works too!
  • BeckaBecka Member Posts: 178
    okay... I made it..

    that's my code: SETFILTER(FieldForFilter,'%1','x*');

    thanks :mrgreen:
    MCSD
    Attain Navision
Sign In or Register to comment.