Data migration 5.0 importing decimals

tinoruijstinoruijs Member Posts: 1,226
Hi,

I'm using Data Migration in 5.0 to import items.
I also want to import the "Unit Price".
I've defined the migration fields and made an export to excel with one test item I manually inserted.

Then I modify the "Unit Price" in the exported Excel-file.
Then Import the file. That works.

But when I fill a second line in the excel-document and import back again, the value of "Unit Price" is without decimals. 1,23 --> 123.
Even 1.23 becomes 123. :evil:

Anyone else had the same experience with the data migration?

Tino Ruijs
Microsoft Dynamics NAV specialist

Answers

  • JoeriJoeri Member Posts: 75
    I had the exact same problem. I also tried copying the properties of the field to the new field, or saving the file to xml and then importing it. But all to no effect. Looks to me like a bug (or a feature:) )
  • tinoruijstinoruijs Member Posts: 1,226
    Thanks for the reply Joeri!

    But still no solution.. :(

    Anybody else?

    Tino Ruijs
    Microsoft Dynamics NAV specialist
  • DaveTDaveT Member Posts: 1,039
    Hi Tino,

    I have just tried this and it worked for me. Im using V5.0 and excel 2007. Is it a version issue I wonder :-k

    It even handled 1.1.1 imported as 1.11

    Also I converted the column to text and still worked
    Dave Treanor

    Dynamics Nav Add-ons
    http://www.simplydynamics.ie/Addons.html
  • tinoruijstinoruijs Member Posts: 1,226
    Hi Dave,

    Thanks for the reply and testing!
    :-k
    I'm also using 5.0 and Excel 2007...

    I'm gonna try it with another client/laptop.

    If it works, I'll let it know.

    Tino Ruijs
    Microsoft Dynamics NAV specialist
  • zutzuzutzu Member Posts: 86
    I have a similar problem.
    When i import fileds that are numbers, sometimes they are imported OK, but sometimes the number are the number * 100.
    My windows configuration is spanish.
    But if i change the windows configuration to english (USA) it goes OK.
  • tinoruijstinoruijs Member Posts: 1,226
    zutzu wrote:
    I have a similar problem.
    When i import fileds that are numbers, sometimes they are imported OK, but sometimes the number are the number * 100.
    My windows configuration is spanish.
    But if i change the windows configuration to english (USA) it goes OK.

    Hi Zutzu,

    Thanks for your suggestion! When I change the Country Settings to English (USA) it works fine!

    \:D/

    Tino Ruijs
    Microsoft Dynamics NAV specialist
  • CobaltSSCobaltSS Member Posts: 137
    Or you can change the input file from 1.00 to 1,00......

    We import data from our Danish head office, and their file comes with decimals as the commaand thousands separator as the period, so we need to change our Regional settings to Danish to do the import, then back to English (Canada).

    cheers,
  • tinoruijstinoruijs Member Posts: 1,226
    CobaltSS wrote:
    Or you can change the input file from 1.00 to 1,00.....

    I already tried that. That didn't work..
    I know it is very strange, but neither 1,23 or 1.23 was imported right...

    Tino Ruijs
    Microsoft Dynamics NAV specialist
  • mgmmgm Member Posts: 126
    Timo,

    Had the same problem when importing an Integer value in a Decimal field.
    This seems to work:
    See the code in function EvaluateTextToFieldRef of CodeUnit 5302
    ..
    
      Field.Type::Decimal:
        IF TextToDecimal(InputText,DecimalVar) THEN BEGIN
          IF ToValidate THEN BEGIN
            DecimalVar1 := FieldRef.VALUE;
            IF DecimalVar1 <> DecimalVar THEN
              FieldRef.VALIDATE(DecimalVar);
          END ELSE
            FieldRef.VALUE := DecimalVar;
        END ELSE
    
          // >>
          //EXIT(FALSE);
          BEGIN
            IF TextToInteger(InputText,IntVar) THEN BEGIN
              IF ToValidate THEN BEGIN
                IntVar1 := FieldRef.VALUE;
                IF IntVar1 <> IntVar THEN
                  FieldRef.VALIDATE(IntVar);
              END ELSE
                FieldRef.VALUE := IntVar;
            END ELSE
              EXIT(FALSE);
          END;
          // <<
    
  • AdministratorAdministrator Member, Moderator, Administrator Posts: 2,499
    [The use of [SOLVED] is no longer supported. Please use the Topic Attribute to put a green checkmark next to the Topic Title]
Sign In or Register to comment.