Import multi-select list with commas

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Angela_V
    Junior Member
    • Jul 2025
    • 6

    #1

    Import multi-select list with commas

    Moin from Hamburg,
    we have a multi-select list in Espo with the following entries:

    Click image for larger version

Name:	image.png
Views:	21
Size:	58.2 KB
ID:	119235
    Some entries contain a comma.

    These list entries are supposed to be updated via the Espo import.

    Kd-Nr.;Name;Branche;Detailbranche
    101539; Freizeit (FR);"(FR) Kunst, Kultur & Events"


    For all entries containing a comma, import is not possible.
    Click image for larger version

Name:	image.png
Views:	19
Size:	52.8 KB
ID:	119236
    Apparently, Espo interprets the comma as a separator for list entries.
    From the Espo forum:
    Click image for larger version

Name:	dataurl552342.png
Views:	18
Size:	5.1 KB
ID:	119237
    How can we import these entries anyway?

    Angela

    ​​​​
  • shalmaxb
    Senior Member
    • Mar 2015
    • 1697

    #2
    For getting to know, how the import format should look, you can always insert one record manually and export from espoCRM as CSV. Then the format should be visible.

    Because of the separator, you missed probably to define it in the import dialog to semicolon.

    Comment

    • yuri
      Member
      • Mar 2014
      • 9126

      #3
      If the values are always presented as single value, you can wrap them these way: [" {value} "]. It will be a valid JSON array which is importable.
      If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

      Comment

      • Angela_V
        Junior Member
        • Jul 2025
        • 6

        #4
        @shalmaxb
        Thanks, but that's not the problem.
        The import works. It's just that commas become an issue in multi-select lists.
        One entry in the list is "(FR) Kunst, Kultur & Events" and that's exactly how it should be imported.
        But the import splits this entry at the comma into "(FR) Kunst" and "Kultur & Events".

        Cheers,
        Angela
        Last edited by Angela_V; Today, 03:28 PM.

        Comment

        • yuri
          Member
          • Mar 2014
          • 9126

          #5
          There's no other workaround currently. The issue that the field expects a list. Either a JSON array or a comma separated string. Your data file contains single values that is not supported.
          If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

          Comment

          • shalmaxb
            Senior Member
            • Mar 2015
            • 1697

            #6
            What if you create temporary separate fields for the terms, which currently are in one value, such as: one field for "Kunst", one field for "Kultur" and one field for "Events".
            Then you split the array values into these terms (each term a column of its own), which is not difficult with Excel. The string\concatenate formula to put them togehter again and
            last step would be to append the concatenated string by array formula to the array field.

            Just a raw idea, and maybe it could have other caveats, but I often get import CSV data, which I have to adapt somehow to fit in my apps.

            Comment

            • Angela_V
              Junior Member
              • Jul 2025
              • 6

              #7
              Originally posted by yuri
              There's no other workaround currently. The issue that the field expects a list. Either a JSON array or a comma separated string. Your data file contains single values that is not supported.
              We are importing a CSV file. I don't think JSON syntax is possible there, right?
              And the actual issue is the comma within the list entry, not that the file contains single values.
              All records that don't have a comma in the list entry are imported correctly.

              Click image for larger version

Name:	grafik.png
Views:	6
Size:	7.2 KB
ID:	119250
              Attached Files

              Comment


              • shalmaxb
                shalmaxb commented
                Editing a comment
                what, if you substitute the comma in the array field with another character, import it and try to substitute it somehow after having imported back to comma. If the values are saved in the json file, it would be easy. If the values are in the database, it should also be possible.
            Working...