<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Newbie Questions</title><link>https://www.infopathdev.com:443/forums/39.aspx</link><description>New to InfoPath? Search to see if your question has already been answered. If it has not, then ask it here or the appropriate topic forum.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Infopath Submitting to SQL Database -- Multiple Selection List Box?</title><link>https://www.infopathdev.com:443/forums/thread/116118.aspx</link><pubDate>Fri, 21 Apr 2017 22:20:35 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:116118</guid><dc:creator>ShelbyH</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/116118.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=116118</wfw:commentRss><description>I can definitely test it out. Thank you so much for confirming this with me. I&amp;#39;ll keep you posted on if this solves this on monday.</description></item><item><title>Re: Infopath Submitting to SQL Database -- Multiple Selection List Box?</title><link>https://www.infopathdev.com:443/forums/thread/116117.aspx</link><pubDate>Fri, 21 Apr 2017 22:18:17 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:116117</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/116117.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=116117</wfw:commentRss><description>No. Your dropdown should be bound to the name, as it is. Is the ID column your primary key? Because your form looks right and your error message indicates an issue with the PK field. If the ID field is an auto-incrementing integer and you are submitting new rows via the form, the submit should succeed.</description></item><item><title>Re: Infopath Submitting to SQL Database -- Multiple Selection List Box?</title><link>https://www.infopathdev.com:443/forums/thread/116116.aspx</link><pubDate>Fri, 21 Apr 2017 22:08:01 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:116116</guid><dc:creator>ShelbyH</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/116116.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=116116</wfw:commentRss><description>We do have that. Do I need to tie the drop down control to that instead of the Name field?</description></item><item><title>Re: Infopath Submitting to SQL Database -- Multiple Selection List Box?</title><link>https://www.infopathdev.com:443/forums/thread/116115.aspx</link><pubDate>Fri, 21 Apr 2017 21:51:38 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:116115</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/116115.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=116115</wfw:commentRss><description>Your DB admin should make distListID an identity type in the database. Then when the form is submitted, you&amp;#39;ll automatically get a unique ID in the DB.</description></item><item><title>Re: Infopath Submitting to SQL Database -- Multiple Selection List Box?</title><link>https://www.infopathdev.com:443/forums/thread/116114.aspx</link><pubDate>Fri, 21 Apr 2017 21:37:06 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:116114</guid><dc:creator>ShelbyH</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/116114.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=116114</wfw:commentRss><description>Also. Is there a way to create an automatically incrementing ID in infopath that I could possibly use to avoid duplicates in the drop down?</description></item><item><title>Re: Infopath Submitting to SQL Database -- Multiple Selection List Box?</title><link>https://www.infopathdev.com:443/forums/thread/116113.aspx</link><pubDate>Fri, 21 Apr 2017 21:21:28 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:116113</guid><dc:creator>ShelbyH</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/116113.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=116113</wfw:commentRss><description>Sure thing. Its simply a test form so it&amp;#39;s very raw. I only have what I&amp;#39;m trying to test in it currently.</description></item><item><title>Re: Infopath Submitting to SQL Database -- Multiple Selection List Box?</title><link>https://www.infopathdev.com:443/forums/thread/116112.aspx</link><pubDate>Fri, 21 Apr 2017 21:15:25 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:116112</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/116112.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=116112</wfw:commentRss><description>Any chance you could attach a copy of your form to a reply under Options?</description></item><item><title>Re: Infopath Submitting to SQL Database -- Multiple Selection List Box?</title><link>https://www.infopathdev.com:443/forums/thread/116111.aspx</link><pubDate>Fri, 21 Apr 2017 21:10:45 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:116111</guid><dc:creator>ShelbyH</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/116111.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=116111</wfw:commentRss><description>My SQL guy did show me that we need some type of unique ID for each selection, or it wont go through. The drop down is bound to a primary key field and when I add a unique ID it doesn&amp;#39;t work if I do more than one option. Is there another approach I need to take?</description></item><item><title>Re: Infopath Submitting to SQL Database -- Multiple Selection List Box?</title><link>https://www.infopathdev.com:443/forums/thread/116110.aspx</link><pubDate>Fri, 21 Apr 2017 21:04:12 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:116110</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/116110.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=116110</wfw:commentRss><description>Are you submitting blank values in them? Is the drop down bound to the primary key field? Or does the table have an identity column?</description></item><item><title>Re: Infopath Submitting to SQL Database -- Multiple Selection List Box?</title><link>https://www.infopathdev.com:443/forums/thread/116109.aspx</link><pubDate>Fri, 21 Apr 2017 20:18:53 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:116109</guid><dc:creator>ShelbyH</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/116109.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=116109</wfw:commentRss><description>Thanks! I&amp;#39;ve tried this just now and I&amp;#39;m getting the following error 

&amp;quot;InfoPath cannot submit the form.
An error occurred while the form was being submitted.
Violation of PRIMARY KEY constraint &amp;#39;PK_tblDistrList&amp;#39;. Cannot insert duplicate key in object &amp;#39;dbo.tblDistrList&amp;#39;. The duplicate key value is (          ).&amp;quot; Is this because of the duplicate drop downs?</description></item><item><title>Re: Infopath Submitting to SQL Database -- Multiple Selection List Box?</title><link>https://www.infopathdev.com:443/forums/thread/116108.aspx</link><pubDate>Fri, 21 Apr 2017 19:13:47 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:116108</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/116108.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=116108</wfw:commentRss><description>In InfoPath, a multiple selection list box is bound to a repeating field. But with a database bound form, if you had an associated table to store the values from the multi select, you&amp;#39;d have a repeating group for the associated table, and you won&amp;#39;t be able to bind a multiple selection list box to that. I can&amp;#39;t think of a way to mimic this functionality without code (or qRules) - you could add a repeating field to the main data source, outside the SQL bound groups, then hook a multi select to that, then on submit populate the related SQL group (inserting the number of needed rows and populating values). Then when you queried, you&amp;#39;d have to do something similar to populate your multi select. Honestly? The easiest approach would be to stick a dropdown in a repeating section so the user can just insert rows and select values.</description></item><item><title>Re: Infopath Submitting to SQL Database -- Multiple Selection List Box?</title><link>https://www.infopathdev.com:443/forums/thread/116107.aspx</link><pubDate>Fri, 21 Apr 2017 19:04:49 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:116107</guid><dc:creator>ShelbyH</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/116107.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=116107</wfw:commentRss><description>Anyone have any ideas?</description></item><item><title>Infopath Submitting to SQL Database -- Multiple Selection List Box?</title><link>https://www.infopathdev.com:443/forums/thread/116095.aspx</link><pubDate>Thu, 20 Apr 2017 23:19:53 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:116095</guid><dc:creator>ShelbyH</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/116095.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=116095</wfw:commentRss><description>I currently have a filler form with query and submit features to a SQL Server database (directly. not with a web service). I&amp;#39;m noticing when I&amp;#39;m dragging my SQL tables onto my form, regardless of how the table is set up, the control is a text box. I&amp;#39;ve gotten into the habit of changing them, but a lot of my original form design uses multiple selection.

We have a table in SQL set up with all the values, and unique IDs, but the form will not let me use the multiple selection control. Here is what I&amp;#39;ve tried so far.



1) I&amp;#39;ve tried manually changing the field control to the multiple selection control. It states the field has to be repeating.
2) I&amp;#39;ve tried going into the properties of the field, but everything is grayed out and I cannot change the field to repeating
3) I&amp;#39;ve tried manually creating my own multiple selection control, having it query the selections from the database then trying to bind it or move it into the field it needs to be. I either get told that the group cannot accept changes, or that I have to change the field to repeating, which it does not let me do.



I&amp;#39;ve seen forms in the past with multiple selection list boxes but I haven&amp;#39;t found a SQL specific tutorial to do so. ANY help or points in the right direction would be amazing.</description></item></channel></rss>