dokuwiki-plugin-struct icon indicating copy to clipboard operation
dokuwiki-plugin-struct copied to clipboard

CSV import not working for lookup fields in schemas

Open macneurolab opened this issue 7 years ago • 4 comments

The CSV import does not import any fields that are defined as lookup types. To show the issue, try importing items to a field that is defined as lookup type in either a Page or Lookup schema. This happens even if the imported items are identical to those already defined in the lookup schemas targeted by the lookup field.

macneurolab avatar Dec 17 '17 16:12 macneurolab

I can't reproduce the issue. Can you give us more details? Including your schemas and a sample CSV that fails to be imported correctly.

annda avatar Feb 22 '19 21:02 annda

The issue is that you can’t import the actual values. You need to import the numbers that correspond to the lookup fields, which is not very practical.

macneurolab avatar Feb 23 '19 17:02 macneurolab

Note: #352 has some code that might help with implementing this.

splitbrain avatar Apr 01 '19 12:04 splitbrain

I'm a bit desperate:

I don't know what the exact syntax in the CSV file must be for this. All my attempts fail, no matter how many quotation marks and brackets I set and how I specify the row number.

Here is my test file with only one item:

pid,cms-akat-matnr,cms-akat-benenn-de,cms-akat-benenn-en
["redaktionssystem:lookup:cms_akat_benenn",1],"[""75677602"",1]","[""Zwischenstück"",1]",["""",1]

The type of all fields of the lookup schema "cms_akat_benenn" is "text".

Can someone give me a hint for this?

Best regards Juergen

Juergen-aus-Zuendorf avatar Mar 30 '21 12:03 Juergen-aus-Zuendorf