How to generate a confiforms macro multi-select list from a csv file
Asked by Stephen Pease:

Hi all,

I'm a bit of a newbie, but have been working with the confluence suite for a little bit and made some decent spaces using the confiforms macros. The most code I have stepped into is leveraging usernames for personalized emails from the IFTTT macro.

I couldn't find specifically what I am trying to do and hopefully it is simple.

I would like to populate a confiforms multi-select macro from a csv file. I have made these dropdowns before and they work great with the ability to type search and collect results, but I have a single column with about 500 entries and using the macro is taking a long time and as I reach roughly 150 I am noticing the macro choking when trying to save (it just spins and when saving or updating the page it doesn't take).

I having a hard time trying to find out how to take the list I have and essentially drop it into the confiforms macro for multi-select. Is this possible? The manual way is rough to say the least and I actually don't know if that many entries is a culprit of the slow response times. Thank you for any help you can offer!

Edit: To add a little more about what I'm trying to do:

I am having users enter in their skill sets and using a huge list of potential choices in a form that they can submit. Smaller dropdowns and multi-select have worked fine in the past, but I haven't had a list this big before. I came back after a few hours and it's still very sluggish and I can't seem to get past 160 entries but I'm not sure if this is a limitation of the macro. Also added some images for clarity in case I am using the wrong syntax in describing what I am using. Thanks again.

-------------

This is what I see when I try to save:

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

-------------

Here is the settings (multi-select)

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

---------------

Here is all I am able to get in the macro (160):

![skill macro end list.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/184149i9B1DEEBDFFFCD5D7/image-size/large?v=v2&px=999 "skill macro end list.PNG")


Answers:
author: Alex Medved _ConfiForms_
body: Hi

Most probably you hit the limits on the macro parameter length that Confluence has (never seen this documented though)

Overall it is not a good method to put so many options into the configuration

Much better approach is to use OTHER form to import you data and then use it in the current form via Smart fields or using the CSV directly (basically a "web-service" like field)

This one is about excel file to be used as a source for ConfiForms field - <https://wiki.vertuna.com/display/CONFIFORMS/Using+Excel+files+as+sources+for+ConfiForms+fields>

But the 1st mentioned approach to use ANOTHER for keeping and managing choices in your field is a much better approach

Alex

comments: author: Stephen Pease
body: Hi Alex,

I feel like I'm getting close but am still a bit stuck. To your first point, you are correct, the macro starts getting errors and slowing around 150 entries, so I think that is about the limit for a multi-select from manual entry.

The second option you presented isn't an option for me, as I can't install additional APIs (provided I'm reading that instruction correctly).

The first option sounds about correct, but I am still having trouble pointing my multi-select form to the existing data.

I can make a CSV Table using the BobSwift CSV Table macro and it displays fine as a nice searchable tool for folks wanting to look at available skills, but I am trying to point to that single column of skills so that they populate in a multi-select dropdown for confiforms.

It feels like I am doing something backwards because when I open a new confiforms form field definition macro and try to use "Smart Multi-select" it is looking for a field, but that list doesn't exist as a field, so I can't figure out how to point it to that list as a field. The options are the other confiforms fields on the page, so I seem to be caught where I need to define the form when trying to create it.

Hope I'm making sense, but I really appreciate the help, thank you!


author: Stephen Pease
body: For clarity, just trying to take a long list of skills and allow users to select ones that apply to them and then submit the form


author: Alex Medved _ConfiForms_
body: No extra something to install, but yes - you need to configure a "connection" in ConfiForms configuration to make it work

Anyway, let's stick to option #1

This is much easier than what you have tried. No need for other 3rd party macros

Let me give you a quick screencast on what do I mean

<http://recordit.co/nVc7W4KMMa>

Hope it helps

Alex


author: Stephen Pease
body: Alex,

You are a treasure, thank you! This was the piece I was missing (getting that darn CSV to show up). I used this method to import and added some bells and whistles for notification in the IFTTT form that emails me when folks manually enter skills. This video was perfect and filled in all the blanks. Everything works perfectly, thank you!


Tags: confiforms

confluence-server

server