web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

XMLport to import Items - String lenght is 148 but it has to be shorter.. ERROR

(0) ShareShare
ReportReport
Posted on by 46

Using Dynamics Nav 2015
In Object designer I have created a XMLport to import Items.
When I run it from Object Designer an error occours ...String lenght is 148 but it has to be shorter or equal to 20...

Property Value
Name ItemImport
Caption <ItemImport>
CaptionML <Undefined>
Direction Import
DefaultFieldsValidation <Yes>
TextEncoding UTF-8
Format/Evaluate <C/SIDE Format/Evaluate>
Format Variable Text
FileName <Undefined>
FieldDelimiter <">
FieldSeparator <,>
RecordSeparator <<NewLine>>
TableSeparator <<NewLine><NewLine>>
UseRequestPage <Yes>
TransactionType <UpdateNoLocks>
Permissions <Undefined>
PreserveWhiteSpace <No>
Unbound <No>


Property Value
Indentation 2
NodeName Description
NodeType Element
SourceType Field
SourceField Item::Description
FieldValidate <Undefined>
AutoCalcField <Yes>
Width 50
MinOccurs <Once>
MaxOccurs <Once>
Unbound <No>

Any help will be appreciated.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Alexander Ermakov Profile Picture
    28,096 on at

    It looks like your port is trying to put a text field into a code field, thus there is a mismatch between table fields.

    If not and you really need to import a value that is longer than the field in the database, you should either cut the field during import to the field length, or increase the length of the field. Note that the last one is tricky and might result in lot of additional work throughout the whole database, as this longer value might be further transferred to other tables and would cause errors if you not expand them either. Also, you may in some cases rich 8 bytes limit of a record and expanding a table field would not be anymore possible unless you contract or delete some others.

  • Groefte Profile Picture
    46 on at

    Thanks but I'm sure that import values is no longer than fields in database.

  • Verified answer
    keoma Profile Picture
    32,729 on at

    best you run the debugger during execution to check where exactly the error occurs, which field is concerned. also validate the import file (csv?). check if the used seperator is. ccorrect interpreted. if not use a different. could also be that there is an error in the structure. always best is, first export an item, then change the values in the resulting export file, import that file.

  • Verified answer
    Alexander Ermakov Profile Picture
    28,096 on at

    If you impot a .csv file, it might be the case that field separator is not interpreted properly by your port.

    What file are you importing?

  • Groefte Profile Picture
    46 on at

    I have tried with excel csv and notepad txt.

    I just changed field delimiter and separator in xmlport.. compile and changed back again to " and ,  .. compile - imported an exported .. and now  :) it Works -  thank you.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans