Separating one field to two in dataport

KatriMKatriM Member Posts: 10
edited 2006-07-26 in Navision Attain
Hi everyone!

I have excel sheet that has contact names on one column, however most of them are too long for contact name field ( 30 char ). What kind of code do I need to cut name field and paste characters that exceed 30 to Name 2 field?

Thank you!

Comments

  • damirdamir Member Posts: 28
    You have to declare new global variable of type text and long enough to hold complete name. Then you should import name to this variable.
    You can split text in OnAfterImportRecord trigger. For example if sName is global var:

    Name := copystr(sName, 1, 30);
    "Name 2" := COPYSTR(sName,31,30);
Sign In or Register to comment.