Hi,
 
I had the same problem earlier as the some of the customer addresses were entered with more than 3 lines with a newline in between. The complete address were not getting printed on the cheques....
I wrote a job to remove the new lines if any. The code is almost similar , but used strNfind,strdel functions. in stead of capturing Enter character, I used '\n'. charater... It did my job.......
 
Subbu


nttrehn <[EMAIL PROTECTED]> wrote:

Hi!

Enter is num2char(10). I would create a job that reads trough the
table using while select.

So if you first give some kind variable like
str enter = num2char(10)
tableName  table;

then compare it to address field characters (read one by one using
system functions). I would do this in a loop:


while select table
{
streetstr = table.street;
for ( i=1; i<=strlen(streetstr);i=i+1)
{
    character = substr(streetstr,i,1);
    if (character == enter)
        streetstr = strdel(streetstr,i,1) // removes the character
   

}
table.street = streetstr;
table.update;

}
Of course you need to also determine which extra enters you have to
remove etc..

I hope this helps!

Regards
Nitta

--- In Axapta-Knowledge-Village@yahoogroups.com, "Danny Gaethofs"
<[EMAIL PROTECTED]> wrote:
>
> Dear all,
>
> I need to remove blank lines from hundreds of vendors and
customers.
> Has someone done this before and want to share the approach.
>
> I need to find the <enter> character or blank line in the street
> field and get rid of it. How can I do this.
>
> regards,
> Danny





Sharing the knowledge on Axapta.

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

Sharing the knowledge on Axapta.



Yahoo! Groups Links

Reply via email to