Copystr without | Sign

omyvadiyaomyvadiya Posts: 101Member
edited 2019-03-26 in NAV Three Tier
How can i copy the values of a string without the |(pipe) sign.


i need to filter with MGR or MTP or MOP on a page, these values can change

i am trying the following code, but i am missing something

LocCode := COPYSTR(UserSetupRec."Location Code",STRPOS(UserSetupRec."Location Code",'|')-1);
MESSAGE('LocCode - %1,STRPOS(UserSetupRec."Location C - %2',LocCode,STRPOS(UserSetupRec."Location Code",'|')-1);
SETFILTER("Location Filter",'=%1',UserSetupRec."Location Code");

Thanks in advance


  • mohana_cse06mohana_cse06 Posts: 5,468Member
    why do you need to copy?
    isn't it working directly?

    SETFILTER("Location Filter",'=%1',UserSetupRec."Location Code");
  • omyvadiyaomyvadiya Posts: 101Member
    Hi @mohana_cse06 -
    No, it is not picking any value on the page.

    Actually i have created a new field of Location code on user setup, and i want the user to see only his her location inventory on item list.

    so i an written the above code OnAftergetRecord of Item list,for one locaiton code it is working fine, but i enter multiple location codes for a single user, the page is blank

  • AlexDenAlexDen Posts: 32Member

    Maybe, you try to filter by wrong field?
    "Location Filter" looks like FlowFilter field, perhaps, you have to filter by "Location Code".
  • omyvadiyaomyvadiya Posts: 101Member
    Hi @AlexDen ,
    As far as i know, there is only Location filter (Flowfilter) in Item table.
Sign In or Register to comment.