Populating a Choice field with SubmitToSharePointList - InfoPath Dev
in

InfoPath Dev

Populating a Choice field with SubmitToSharePointList

Last post 01-17-2014 01:08 PM by cmille34. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 01-17-2014 05:55 AM

    Populating a Choice field with SubmitToSharePointList

    I am using qRules 4.2 (great product by the way)!  I am working on a single form that will submit service requests to our applicable service departments. These requests are housed in different lists within SharePoint, SubmitToSharePointList to the rescue!  I've got most of it working but I've hit a brick wall.  For one of the departments, their custom service request list has a "Choice" field where you can select one or multiple values.  I have a Multiple-Selection box on my InfoPath form that has all the same values.  I can submit these values with SubmitToSharePointList to create a new list item but the actual check boxes aren't selected when I go to edit the list item in SharePoint.  I am guessing there is some special format to the text string similar to the -1# type thing you need to use to map a userID to a people picker?  It is just a guess.

     

    The closest I have gotten is converting the Multiple-Selection values to a single text string with values separated by commas.  When this string is mapped to the 'Choice' field in the SharePoint list, it seems OK because on the view, the values show up, but when I go to edit the item you quickly see that it didn't check the boxes for the choice boxes.

     

    I've done some searching and come up empty handed. Hopefully someone has a quick fix - thanks!

     

    -Chris

  • 01-17-2014 10:15 AM In reply to

    Re: Populating a Choice field with SubmitToSharePointList

    Hi Chris,

    The multiple selection list box is a repeating control, so I don't think it can be mapped into a single list item... unless the multiple selections are "flattened", like creating a comma-delimited string.

    When creating the mapping, you could select the option for "Repeating data" in the mapping tool. Then select the mapping's repeating node to be the node for the Multi selection List box.

    This would result in creating one list item for every option selected in the Multi Selection List box. Is that the desired result?

    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™


  • 01-17-2014 11:04 AM In reply to

    Re: Populating a Choice field with SubmitToSharePointList

    Thanks for the response!  I don't think this is the desired result, I'll try to do a better job explaining the form (sorry for being vague earlier). I want all these values going into a single list item. 

    In the SharePoint list, I have a 'Choice' column called "Request Type".  That has 28 different options (Market Research, Analysis, Other, etc).  They can choose multiple values from that list it they want.  Naturally this works fine when using the basic SharePoint list controls.

    Now in my InfoPath form, I have a Multi-Selection box that has all these same values.  I then flatten all the values into a single comma separated string with the following rule and default value on another text field:

    substring(eval(eval(ResearchTypes[. != ""], 'concat(", ", .)'), ".."), 2)

    My gut is telling me I am just not collapsing it down into a string correctly but I could be way off.

    I then mapped that field to the 'Choice' column in the SharePoint list and it populates the field when you look at it the view, however, when you open the item to edit it, the applicable checkboxes for those Choice items are not selected. 

    Is it possible to populate a Choice column in SharePoint from InfoPath? If so, how? :)  Thanks again for the help!  I am really stuck here.  I would be shocked if your product doesn't do it, Im hoping Im just doing something wrong/dumb.

  • 01-17-2014 12:34 PM In reply to

    Re: Populating a Choice field with SubmitToSharePointList

    I checked with the team and you are taking the right approach. Try separating with ;# instead of a comma.

    For example:

     ;#Monday;#Friday;#

     

    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™


  • 01-17-2014 01:08 PM In reply to

    Re: Populating a Choice field with SubmitToSharePointList

    Winner winner! ;# has to prefix each item.

     I tried #; for some reason at some point.  Sheeesh - so close.  Thanks for the quick help!  Much appreciated.

     

    -Chris

Page 1 of 1 (5 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.