Hi i'm new of the forum and i need your help! i'm trying in all the way to delete the white spaces in a string!!but i can't find a solution!! i have imported datas with a dataport in a table, now i want to remove white spaces in the field "VAT Registration No."!!! i used the code below...
what's wrong?
why it doens't work? please help me to find a solution
blanktext := '';
FOR i :=1 TO STRLEN("VAT Registration No.") DO BEGIN
IF "VAT Registration No." <> ' ' THEN
BlankText := BlankText + FORMAT("VAT Registration No.");
END;
"VAT Registration No." := BlankText;
0
Comments
how is it possible?
is it couse the datas come from a dataport?
Jan Hoek
Product Developer
Mprise Products B.V.
Yes i've already tried even with DELCHR function...
help help :-(
in the txt file i used for importing data some character are like this "ÿ" and then when i import them they become " " so i think that even if they become white spaces, after importing, they are not the character " "...
Anyone have an idea?
Jan Hoek
Product Developer
Mprise Products B.V.
DELCHR(String,'=',FF);
thanx thanx thanx
create a variable myChar of type Char. and another variable for mytext as text
in your code
do this
MyChar := 255; /note 255 is decimal for hex FF
Mytext := format(MyChar);
DELCHR(String,'=',Mytext);
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
now it works!! i have another question...Can i in a dataport for importing data put some code to manipulate all the field for removing a character without putting the code in every dataport fields??
:?
Also use an array to put the data in first. Then write a forloop to go through the array and run your delete chr function. Then assign the array to your record fields.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!