Copied to clipboard

Flag this post as spam?

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


  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Feb 08, 2012 @ 10:13
    Ismail Mayat
    0

    multi tree node picker issue

    Hi,

    I am using 4.7.1 and latest version of cmsimport.  I my doctype called directory i have a field called directory type this is multi tree node picker, it can have a range of values and they are stored as csv.  I created spreadsheet for each directory type and set the category column to the type.  My first import batch was for type Antique centre and warehouses.  I did the import all fields imported except for category value not all records had the value even though in the spreadsheet it had been set.  So i reimported again so that it updated all records and now all category values have been set.

    I then created a new batch this time with category insurance.  I imported and this time all fields imported except for category.  I then tried reimporting so that records are updated but this field still did not import.  

    When multitree node picker field how does cmsimport do the mapping does it expect node name or id?  So if you have nodename it does a look up for that node name and assigns the value or is it expecting an id?

    One thing to note my csv files are separated with ; not ,

    Regards

     

    Ismail

  • Richard Soeteman 4046 posts 12899 karma points MVP 2x
    Feb 08, 2012 @ 10:23
    Richard Soeteman
    1

    Hi Ismail,

    I Assume you use Ucomponents MNTP for content? CMSImport doesn't do anything special with this field, only for media as you can see in the advanced settings.(this advansed setting is pro only btw) This is because nodes must already exists and people have different structures in their datasources that they want to map. Best you can do is either write a Fieldadapter for this (I think I have some code somewhere which does that, can email that later/tomorrow I'm currently onsite). or use the method you blogged about?

    Cheers,

    Richard

     

  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Feb 08, 2012 @ 10:25
    Ismail Mayat
    0

    Richard,

    Just seen that in the documentation.  However I dont understand why it worked for the first import batch.  The value  has been set correctly.

    Regards

    Ismail

  • Richard Soeteman 4046 posts 12899 karma points MVP 2x
    Feb 08, 2012 @ 10:28
    Richard Soeteman
    0

    Serious? Think that is by accident... or you had the format right the first time?

     

  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Feb 08, 2012 @ 10:40
    Ismail Mayat
    0

    Richard,

    In my insurance spreadsheet i just updated the category column from insurance to the id of insurance and it works.  No idea why for first batch it worked with node name. You have un intended feature there. Not that I am complaining as it works and i can import the data. I dont fancy going through hundreds of records and updating one field.

    Maybe in the cmsimport code you are doing lookup on name then if not found you use id?  For my first batch the name is quite unique and it only finds one match where as with insurance its finding more than one match and setting that id hence in the editor i see missing node image under multi tree node picker field?

    Regards

    Ismail

  • Richard Soeteman 4046 posts 12899 karma points MVP 2x
    Feb 08, 2012 @ 11:34
    Richard Soeteman
    0

    Ah well that explains all, I assume your property data is stored as csv then when you insert the id's it will work By default CMSImport doesn't change anything so when you map the id and it's the right format it will be mapped correctly. FieldAdapters and Advanced settings are only meant to work when the data isn't in the correct format then it will try convert the input to the desired format for the datatype.

    I still think you need a FieldAdapter or that other option you blogged about to format the multiple id's to the desired format. That process is quite simple, open the propertydata table and see how it got stored then format your input to that format and it shoudl work also. 

    Does that makes sense?

Please Sign in or register to post replies

Write your reply to:

Draft