CSV Import API showing blank on Confiforms
Asked by Stephen Pease:

[@Alex Medved _ConfiForms_](/t5/user/viewprofilepage/user-id/781630) helped me figure out how to import a CSV file so that it populated in a Smart Multi-Select field in Confiforms here: [Solved: How to generate a confiforms macro multi-select li... (atlassian.com)](https://community.atlassian.com/t5/Confluence-questions/How-to-generate-a-confiforms-macro-multi-select-list-from-a-csv/qaq-p/1948555)

However, I needed to update my list using a new CSV file.

I went to the page and first selected "Cleanup API" which erased all the records. Then I followed the same process for importing the files, and after selecting "View/Edit Stored Data" I can see the whole list populated correctly like below:

![Populated List.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/197599iA95DF54CEAC1957D/image-size/large?v=v2&px=999 "Populated List.PNG")

However, when I go back to my field that should contain this list, it is now showing blank. Strangely, if I scroll, it appears that the correct amount of records are there (it takes a long time to scroll and there are roughly 500 records, so it seems correct), however, everything is blank. See below:

![Blanks.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/197600i25A89EF8A1D971B2/image-size/large?v=v2&px=999 "Blanks.PNG")

Anyone have any idea what I might have done wrong? I appreciate any help. Additional info on the import is I am importing a single column CSV file using UTF-8 (and that is how the CSV was saved), but the list is correct on the page that holds the records, so not sure what is going wrong when linking the Confiform Macro so the Smart Multi-Select populates with the records (that are not blank). Thank you!


Answers:
author: Alex Medved _ConfiForms_
body: Hi

You are talking about updating your data, but at the same time use *clean up* APIs to remove it and then *import* APIs to import NEW data

This does not sound like an UPDATE

From what I can see on a screenshot is that you reference a "SkillName" field, but imported your data into a "Skill" field. So it basically does not have a "label" to show for the choices in the dropdown field and renders it as blank

Alex

comments: author: Stephen Pease
body: Hi Alex,

That is what I was thinking, but not sure where I am going wrong or where to fix that labeling. I was using clean up APIs because it removed all the records rather than me having to individually delete each one (or a large collection of them). Since a fair amount of changes to the list were required, I had assumed the fastest way was to remove all and just re-import a new list. When I look at the label it says "Skill \[SkillName\]" as you noted, but not sure which part applies to which part. In my CSV file it is just a column with a heading called "Skill."

Here are the steps I am taking, and for good measure, I changed the column heading to SkillName in the CSV, but I imagine I am doing something wrong at the import step.

1. After clean up API, the records are gone, now I import the CSV  
![Import1.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/197736i83504967B24EF3F0/image-size/large?v=v2&px=999 "Import1.PNG")

2. Select the CSV file to import and click next  
![Import2.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/197738iFA080018C06E5EE9/image-size/large?v=v2&px=999 "Import2.PNG")

3. The next step is where I imagine I am doing something wrong. I am met with this window and normally I would just select the top left checkbox, which selects all records, then use the dropdown to select "SkillName" and import the records. I also normally de-select the "SkillName" header (I have also tried selecting it, but it just shows up as a record rather than a label or header).

![Import3.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/197744i2A169A1FE5076C9A/image-size/large?v=v2&px=999 "Import3.PNG")

4. Skills are imported along with the header (I can always remove it)

![Import4.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/197745i700D91E701EF91E6/image-size/large?v=v2&px=999 "Import4.PNG")

5. The list is still blank and the label has the strange "Skill \[SkillName\]" wording.

![Import5.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/197746iF6FF458FF4F364CD/image-size/large?v=v2&px=999 "Import5.PNG")

Any ideas where I am going wrong or how to fix the labeling if that's the issue? I'm at a loss. Thank you!


author: Alex Medved _ConfiForms_
body: Hard to tell really... Doe it render the same on the form? (not in preview mode)


author: Stephen Pease
body: Unfortunately yes. It's identical, where it appears to be the entire list of 500+ records, but just blank. It worked so perfectly before and I'm just not sure what happened differently. I agree with you though that the "Skill \[SkillName\]" *could* be a problem, just not sure why or where to fix it.

The whole list is there on the page being referenced and it looks perfect, but once I try to point to that list from a Confiforms macro, it shows blank BUT with the caveat that there are 500+ blank entries, so it at the very least is seeing the count of records, just not the records themselves. Is there another page or setting that I may be missing or something else that gets erased when I do a "Clean up APIs"?


author: Alex Medved _ConfiForms_
body: May I see a complete configuration of this "smart" field?

Is there anything in the "Override label value with custom label" parameter?


author: Stephen Pease
body: Sure, and no, everything else is default. I can't get a single shot of the whole thing since the window size is static for the confiform pop-up, but if you wanted to see any other fields, let me know.

![override.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/197750i90245C89BAAFE367/image-size/large?v=v2&px=999 "override.PNG")

I even made a new page from scratch and followed the same steps and am getting the blank smart multi-select entries. I even went back to our original setup where the entry was on the same page as the import and the blank results still remain:  
![newpage.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/197752iAD708B627348CCCC/image-size/large?v=v2&px=999 "newpage.PNG")

I can't figure out what is going wrong. Perhaps something in the label part when importing or it's somehow pointing to the wrong location? The things I know:

1. The list in the Confiforms multi-select have the correct amount of records, but they are blank

2. The import page is showing the records correctly by name

3. When I import, I am using the dropdown to select "Skill" as the defined name for the Confiforms Form Field Definition, and have the column title in the CSV labeled "Skill", though I do NOT select that single line, because when I do, it just imports the column header as a record along with the other skills and I do not want "Skill" in the list of records as a skill.


author: Stephen Pease
body: Hi Alex,

I may be on to something. I think the pipe characters surrounding the skills may be messing up the import ( the "\|"). When I re-created the list without the pipes the list now is accessible and not blank. Is there a way around this? I need the pipe characters for being able to separate skills from each other when exporting the data, because when they are dumped into an excel document, multi-selected items all cram into a single cell, which is fine if they are separated by the pipe character, but as is doesn't work because some terms have the same words, spaces, commas, etc. which make separating them a nightmare. I am not certain this is the issue, but without the pipe character everything seems to work just fine without any issues.


author: Alex Medved _ConfiForms_
body: "Pipes" are not good and seems to confuse and mess around with ConfiForms field configuration

Please do not use them as labels for your values

Alex


author: Stephen Pease
body: Copy that. This is the answer. I will mark this as the answer and carry on with trying out other options, but in the meantime if you know of any characters that won't mess with Confiforms fields, let me know (like \*, %, +, etc.) Thanks!


author: Stephen Pease
body: Also, I can't directly accept this when it is this deep in the replies, would you mind posting this as a top-level response so I can mark as the answer? Thank you!


author: Stephen Pease
body: Just going to go ahead and add to this and mark the main thread as an answer.

To Follow on to anyone running into this bizarre issue, Alex confirmed that pipes, or the "\|" character does not work well when using the import API to bring a CSV list into a Confiforms Smart Multi-Select list. That being said I was able to confirm that using the asterisk "\*" worked just fine. I am now able to use formulas in excel upon export to separate the multiple selections that are crammed into one cell. Thank you [@Alex Medved _ConfiForms_](/t5/user/viewprofilepage/user-id/781630) for your help!


author: Alex Medved _ConfiForms_
body: It's only "pipes", as they are used internally for storing values in configuration

(as well as used in the code to separate value pairs)


Tags: confiforms

confluence-server

csv

server