<?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>General</title><link>https://www.infopathdev.com:443/forums/41.aspx</link><description>If you're not sure where to ask your question, ask it here. If necessary, our moderators will make sure it gets classified in the correct board.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Trying to follow code to Programmatically select all items in a multiple-selection (multi-select) list box</title><link>https://www.infopathdev.com:443/forums/thread/115676.aspx</link><pubDate>Wed, 22 Feb 2017 23:11:09 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:115676</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/115676.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=115676</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Great, glad you got it figured out. Sorry if the forum ate your formatting - we are running on an older version of Community Server that seems to work best with Internet Explorer. :)&lt;/p&gt;</description></item><item><title>Trying to follow code to Programmatically select all items in a multiple-selection (multi-select) list box</title><link>https://www.infopathdev.com:443/forums/thread/115668.aspx</link><pubDate>Wed, 22 Feb 2017 16:40:49 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:115668</guid><dc:creator>JeffVojtko</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/115668.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=115668</wfw:commentRss><description>This post seems to have what I am trying to do - http://www.bizsupportonline.net/infopath2007/programmatically-select-all-items-multi-select-list-box.htm
But, I cannot make it work with my external data source.

Data source called - kits_docs
Entries - /dfs:myFields/dfs:dataFields/d:SharePointListItem_RW
Value - d:val4kitID
Display - d:val4kitID

I can&amp;#39;t seem to map my fields to Sym&amp;#39;s.

FIGURED IT OUT AS SHOWN BELOW:

On-Click:
            Dim kits As XPathNodeIterator = DataSources(&amp;quot;kits_docs&amp;quot;).CreateNavigator().Select( _
            &amp;quot;//d:SharePointListItem_RW&amp;quot;, NamespaceManager)

            Dim kit As XPathNavigator
            For Each kit In kits
                Dim number As String = kit.SelectSingleNode(&amp;quot;d:val4kitID&amp;quot;, NamespaceManager).Value
                AddItem(number)
            Next

Public Sub:

        Public Sub AddItem(ByVal itemId As String)
            Dim DOM As XPathNavigator = MainDataSource.CreateNavigator()
            Dim group2 As XPathNavigator = DOM.SelectSingleNode(&amp;quot;//my:group2&amp;quot;, NamespaceManager)
            Dim KitList As XPathNavigator = DOM.SelectSingleNode(&amp;quot;//my:group2/my:KitList&amp;quot;, NamespaceManager)
            Dim newNode As XPathNavigator = KitList.Clone()
            newNode.SetValue(itemId)
            group2.AppendChild(newNode)
        End Sub</description></item></channel></rss>