Select MULTIPLE default values for a multiple selection list box based on another field in Infopath 2010

Hello there - Before I explain my issue, I would like to point out that I have reviewed some other discussions on selecting default values for multiple selection listbox. But my issue is specific and different, and not answered by any of the discussions I visited.

I have a multiple selection list box (say for example all countries in the world as values), and I would like to pre-select or setup multiple default values (say five countries) based on some criteria that I query from MS SQL database table.

I know we can go to Data | Default Values option to setup one or many default values for multiple selection list box. When I enter the default values manually this works. I also right click the field under the Multiple-Selection List Box group, then select Add another Value Below and set the Default Value for this field to setup multiple default values.

However, if I reference a field (either an infopath field or a field from SQL database) I am not able to setup multiple default values. Infopath automatically selects the last field I selected for all instances and in the end I am able to see only one default value selected instead of many. How to fix this problem? Why would infopath allow multiple default values when we enter it manually but not when we reference some fields?

Please let me know if you need more info. Appreciate your help.

Thanks!



  • Edited by redhotc Friday, February 21, 2014 5:52 PM
February 21st, 2014 8:50pm

Hi redhotc,

According to your description, my understanding is that you want to set multiple default values for a multiple checkbox list in InfoPath form.

I did a test with SQL database table. I set three default values for the checkbox list by adding three values field under the group field(Data->Default values), each value field is for a default value. Then publish it to my SharePoint site, everything was fine.Please have a try as the below link:

http://www.bizsupportonline.net/infopath2010/pre-select-items-multiple-selection-list-box-infopath-2010.htm

Note: if you are using SQL databse table, you may need to enable Allow cross-domain data access for user form templates that use connection settings in a data connection file in CA. More information, please refer to:

http://answers.flyppdevportal.com/categories/sharepoint2010/sharepoint2010customization.aspx?ID=418b9423-a96c-4e5e-91f9-6a1b010ebb69

I hope this helps.

Thanks,

Wendy

Free Windows Admin Tool Kit Click here and download it now
February 24th, 2014 12:14pm

Hello Wendy - Thanks for your response. However, my problem is not resolved.

I already had a look at the first link before posting my question here.

As per your example, when I manually type in values "Mizuno" and "Saucony" - as explained in the link - under two value fields it works. But, instead of typing in the values, if I select a field (say a text box field in the same infopath form with the value "Mizuno") using "fx" button next to default value, I am not able to set multiple default values. The system takes only one default value (the latest one that I enter).

Can you show me an example, where insteadt of typing in multiple default values you get each default value field from different fields in infopath and still able to select set multiple default values?

Please let me know if my question is unclear.

Thanks!

February 25th, 2014 8:48pm

Hello,

I am also facing the same issue. I want to set the multiple choice field default value based on value selected on another drop down. I have created the web service method to retrieve the field value to be selected.

But How to set these field values.

Free Windows Admin Tool Kit Click here and download it now
February 4th, 2015 5:36am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics