No announcement yet.

about import since more recent versions

  • Filter
  • Time
  • Show
Clear All
new posts

  • about import since more recent versions

    Since more recent versions - I don`t know exactly with which version it started - I get problems when importing from older versions or even csv-files from other apps.
    I create an export from a former version of my app with customizations and as used I map the fields accordingly. In the newer version I have new fields, old had been discarded, but those which I kept have even the same name. Import always fails with errors, not importing anything at all.
    The error messages are so without information as "validation" or "integrity type constraint". Even ignoring the most of the mentioned fields does not let me import.

    I know this has all to do with the new feature of validation, but this makes importing impossible.

    Has anyone else experienced this or even a solution for it? Formerly the import worked as I am used to, but now I have to discard this option completely.

  • #2
    Before, you imported invalid data. You had/have invalid data in your CRM, some features will work improperly because of that. Since the validation is applied, you need to make sure your imported data is valid. In most cases it's enum values in CSV that are not allowed for the field.

    > integrity type constrain

    This has been always. Nothing new here. Now it shows the error message, before it didn't but failed.

    If you need help, you need to provide a concrete example.


    • #3
      "Integrity-Constraint-Violation" error occurs when you importing an ID that already exists. Most likely you didn't reverted the previously imported records and try to import them again.


      • #4
        You can map enum values in your spreadsheet app using the VLOOKUP function.

        Example, maps new => New, in process => In Process:

        Click image for larger version  Name:	image.png Views:	0 Size:	9.5 KB ID:	86812

        Another option is to use Find and Replace. in the spreadsheet app.

        Yet another option, is to create an aux varchar field in the Espo and write a formula before-save script that will map imported values to Espo valid values and write it to the target field. Then you will always be importing the problem column to that aux field.

        Yet another option, is to add enum missing options from your import source to the field. Then after import do mass update to replace values to proper one. Then remove those values from the field options.

        Yet another option, not to use the enum field type but use varchar with options.
        Last edited by yuri; 01-06-2023, 10:11 AM.


        • #5
          Thank you for the explanation, I will see if I get old data importend with a decent amount of effort.


          • #6
            Found on the internet recommendations for Salesforce:

            If the values between your old system and Salesforce are different, you can use a ‘find & replace’ or a vlookup function to replace old system’s values with the new Salesforce picklist values prior to importation.
            Funny, they come up with exactly the same recommendations as I did.


            • #7
              Originally posted by yuri View Post
              Found on the internet recommendations for Salesforce:

              Funny, they come up with exactly the same recommendations as I did.
              I never would doubt your recommendations.

              I will have a look into that, perhaps it makes the things easier. Thank you again.


              • #8
                ok, if I understand right, I also guess, that in my old enum fields (enum and multi enum) there are values, which I do not have in the new fields, for example this structure:

                new enum field with the following values: value1, value2, value3
                old field has: value1, value2, value3

                import should work without error

                old field has: value one, value two, value three

                import will not work, because the new value is written differently.

                old field has: value1, value2, value3, value4

                import will not work, because there is value4, which is not present in the new enum, will not match the new value structure.

                Do I understand correctly?