Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)

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

Posted on by 72

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

  • Groefte Profile Picture
    Groefte 72 on at
    RE: XMLport to import Items - String lenght is 148 but it has to be shorter.. ERROR

    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.

  • Verified answer
    Alexander Ermakov Profile Picture
    Alexander Ermakov 28,094 on at
    RE: XMLport to import Items - String lenght is 148 but it has to be shorter.. ERROR

    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?

  • Verified answer
    keoma Profile Picture
    keoma 32,675 on at
    RE: XMLport to import Items - String lenght is 148 but it has to be shorter.. ERROR

    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.

  • Groefte Profile Picture
    Groefte 72 on at
    RE: XMLport to import Items - String lenght is 148 but it has to be shorter.. ERROR

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

  • Suggested answer
    Alexander Ermakov Profile Picture
    Alexander Ermakov 28,094 on at
    RE: XMLport to import Items - String lenght is 148 but it has to be shorter.. ERROR

    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.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans