Filter with * (asterisk)

kalinkalin Member Posts: 7
Hello

How to set filter on a form to find only this rows which description contains substring '*$*' ??

Wojtek

Comments

  • kinekine Member Posts: 12,562
    you mean value including the asterisk?

    Than you can try to use something like:
    SETFITLER(MyField,'*%1*','*$*');
    
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • kalinkalin Member Posts: 7
    kine wrote:
    you mean value including the asterisk?

    Than you can try to use something like:
    SETFITLER(MyField,'*%1*','*$*');
    

    Yes, value include the asterisk.

    Your proposition won't work in Nav 4.03 SQL.

    Besides i need to put that filter on form (F7) not in code.

    I'm almost shure that this is imposible i need confirmation.
  • kinekine Member Posts: 12,562
    try to enter '*$*' (including aphostrophes)....
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • garakgarak Member Posts: 3,263
    you can use CTRL+F
    Regards
    Do you make it right, it works too!
  • kalinkalin Member Posts: 7
    garak wrote:
    you can use CTRL+F

    I dont wont to find. I wont filter my journal.

    Right now i make function like this:
    FindSubString()
    IF COUNT = 0 THEN EXIT;
    
    w.OPEN ('Enter Substring. #1#########\',subvalue);
    w.INPUT(1,subvalue);
    
    FINDFIRST;
    REPEAT 
      IF STRPOS(Description,subvalue) > 0 THEN
        MARK(TRUE)
      ELSE
        MARK(FALSE);
    UNTIL NEXT = 0;
    
    MARKEDONLY(TRUE);
    

    It's working but there should by simpler way.
Sign In or Register to comment.