Problem with ' in string

I have the following problem. The global text1 has to be filled with a string that contains a ’ . In Navision it is coded like this: text1 := ‘ab’cd’; The result is an error. Has anyone a solution?

do that : text1:=‘ab’‘cd’; Regards, Jean-Marc

Declare variable C as CHAR; C := 39; text1 := strsubstno(‘ab%1cd’,C); OR text1 = ‘ab’ + format(C) + ‘cd’;

Jean-Marc and Anfinnur, thanks for your solutions!

I’‘ve used this way text1 := ‘ab’+’’’’+‘cd’;

Hi, Declare Text Constatnt TXT001 with Constvalue as ’ text1 := ‘ab’+ TXT001 + ‘cd’;

Okay … here’s my question: I had several Item No.'s thar were surrounded by parenthesis … for example …(50350-490-2) If I want to filter on Item No. with (*, the filter works as if it was just * because the parenthesis is assumed part of the logic formating. Even if I did (???-???-?) as a filter the ()'s are removed. Any idea on how to use ()'s literally in a filter? I solved the problem by renaming the Item’s with {}'s instead. Enjoy the challenge … -john

Hi, 1. Define a text constant TXT001 with constvalue as ‘(*’ 2. Record.SETFILTER(Record.Filed,TXT001);

John, From user interface you must set the filter as ‘(50350-490-2)’ and ‘(’ If you find the item on the Item Card and press F7 on “No.”, can you see who Navision will set the filter. From code you can use Item.SETFILTER(“No.”,’’’(’’’); Bjarne