Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Chester Campbell 98 posts 209 karma points
    Mar 05, 2021 @ 21:00
    Chester Campbell
    0

    Additional Options for Importing Arrays

    When mapping an input property to an Umbraco.MultiNodeTreePicker export property you have to format the input string as a comma-delimited array of strings. Like this: "thing,other thing,something,not a thing".

    CMSImport is taking that string and splitting it on the commas and then checking each substring against node names in the CMS.

    It would be extremely helpful if during the mapping process one could define what the delimiter is. For example: a comma, a semi-colon, or a pipe.

    The reason for this is because the Umbraco CMS allows commas in node names! This causes a huge problem when trying to map the input csv string to the node names in the CMS.

    As an example, let's say we're mapping a list of authors. If the input string looks like this:

    "John Doe,Jane Doe,Jack Doe, Jr."
    

    And our node names in the CMS are these:

    John Doe
    Jane Doe
    Jack Doe, Jr.
    

    CMSImport is going to split the string into these separate substrings:

    John Doe
    Jane Doe
    Jack Doe
    Jr.
    

    And obviously our values aren't going to match. But if we could define the delimiter ourselves then perhaps our input string could look like this:

    John Doe|Jane Doe|Jack Doe, Jr.
    

    Thanks!

Please Sign in or register to post replies

Write your reply to:

Draft