Page 1 of 1

CR/LF (linebreak) in a field

Posted: 2009-06-18 10:51:31
by manolo7
Does anybody know how to find the CR/LF (linebreak) sequence in one of AMC fields (DESCRIPTION for example)? I need to replace a part of the field and that part contain some CR/LF.

Posted: 2009-06-18 12:03:57
by bad4u
Linebreak is #13#10
Tab is #9

e.g.

Code: Select all

value := StringReplace(value, #13#10, ' ');  // replaces all linebreaks with spaces

Posted: 2009-06-18 12:27:25
by manolo7
While is not exactly what I want, is an important step forward for me. I never noticed the StringReplace function before.

Thank you bad4u.

Posted: 2009-06-18 12:44:11
by manolo7
I never noticed the StringReplace function before
Shame on me.

Posted: 2009-06-18 16:47:00
by bad4u
For scripting procedures and functions I really recommend having a closer look on the help file (>Technical information >Script files creation). Or simply click on help button while inside scripts editor ;)