<?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>Code</title><link>https://www.infopathdev.com:443/forums/45.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Value of a field...namesspace issue?</title><link>https://www.infopathdev.com:443/forums/thread/22370.aspx</link><pubDate>Thu, 16 Aug 2007 19:45:30 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:22370</guid><dc:creator>brandtsmith</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/22370.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=22370</wfw:commentRss><description>&lt;p&gt;da huh...might help if I had pulled from the secondary DOM...&lt;/p&gt;
&lt;p&gt;var wVar = XDocument.GetDOM(&amp;quot;GetSCMAAccounts&amp;quot;).selectSingleNode(xpath).text;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;been a while since I last used IP...&lt;/p&gt;</description></item><item><title>Re: Value of a field...namesspace issue?</title><link>https://www.infopathdev.com:443/forums/thread/22359.aspx</link><pubDate>Thu, 16 Aug 2007 14:39:18 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:22359</guid><dc:creator>brandtsmith</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/22359.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=22359</wfw:commentRss><description>&lt;p&gt;strange...this code works perfectly when the webservice is used as the main data connection (rcv only)&lt;/p&gt;
&lt;p&gt;var xpath = &amp;quot;/dfs:myFields/dfs:dataFields/s0:GetSCMAAccountsResponse/s0:GetSCMAAccountsResult/ns1:SqlRowSet1/ns1:row1/ns1:scmaaccount&amp;quot;; &lt;br /&gt;var wVar = XDocument.DOM.selectSingleNode(xpath).text; &lt;br /&gt;XDocument.UI.Alert(&amp;quot;SCMA Account = &amp;quot; + wVar);&lt;/p&gt;
&lt;p&gt;so...it has to be something to do with the namespace??? dfs is declared...s0 is declared...ns1 is declared...???&lt;/p&gt;</description></item><item><title>Re: Value of a field...namesspace issue?</title><link>https://www.infopathdev.com:443/forums/thread/22347.aspx</link><pubDate>Wed, 15 Aug 2007 21:17:37 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:22347</guid><dc:creator>brandtsmith</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/22347.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=22347</wfw:commentRss><description>&lt;p&gt;OK...bad code at first post...forgot to mention it is a 2dairy ds ... here is the code:&lt;/p&gt;&lt;p&gt;function btnSelectSCMAAccount::OnClick(eventObj) { &lt;br /&gt;// Write your code here &lt;br /&gt;&lt;br /&gt;// Get the DOM for the Seconday Data Source &lt;br /&gt;var dat = XDocument.DataObjects(&amp;quot;GetSCMAAccounts&amp;quot;).DOM; &lt;br /&gt;dat.setProperty(&amp;quot;SelectionNamespaces&amp;quot;, &amp;#39;xmlns:dfs=&amp;quot;http://schemas.microsoft.com/office/infopath/2003/dataFormSolution&amp;quot; xmlns:s0=&amp;quot;http://tempuri.org&amp;quot; xmlns:ns1=&amp;quot;urn:schemas-microsoft-com:sql:SqlRowSet1&amp;quot; &amp;#39;); &lt;br /&gt;&lt;br /&gt;var xpath = &amp;quot;/dfs:myFields/dfs:dataFields/s0:GetSCMAAccountsResponse/s0:GetSCMAAccountsResult/ns1:SqlRowSet1/ns1:row1/ns1:scmaaccount&amp;quot;; &lt;br /&gt;var wVar = XDocument.DOM.selectSingleNode(xpath).text; &lt;br /&gt;XDocument.UI.Alert(&amp;quot;SCMA Account = &amp;quot; + wVar);&lt;/p&gt;&lt;p&gt;}&lt;/p&gt;&lt;p&gt;I get an &amp;quot;object required&amp;quot; message for the statement &lt;strong&gt;var wVar = XDocument.DOM.selectSingleNode(xpath).text; &lt;br /&gt;&lt;/strong&gt;&lt;/p&gt;</description></item><item><title>Re: Value of a field...namesspace issue?</title><link>https://www.infopathdev.com:443/forums/thread/22345.aspx</link><pubDate>Wed, 15 Aug 2007 19:26:10 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:22345</guid><dc:creator>brandtsmith</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/22345.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=22345</wfw:commentRss><description>OK..I htink it has somethin gto do with the repeating table being on a different view...I have a seperate view to display several fields and want the user to pick a row from which I will popluate a few fields on the main view...I copied a button that displayed some chicken tracks from the main view to the second view and got the same nastygram about undeclared namespaces....????</description></item><item><title>Value of a field...namesspace issue?</title><link>https://www.infopathdev.com:443/forums/thread/22344.aspx</link><pubDate>Wed, 15 Aug 2007 19:10:46 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:22344</guid><dc:creator>brandtsmith</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/22344.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=22344</wfw:commentRss><description>&lt;p&gt;IP2007&amp;nbsp;&lt;/p&gt;&lt;p&gt;Just started working with webservices created from SQL2005 SOAP Endpoint creation...which pulls data nicely onto the form...problem is trying to read a field value of the repreating table...I do this all the time with database connected fileds, but can&amp;#39;t seem to get the syntax right...or it&amp;#39;s a namespace issue...&lt;/p&gt;&lt;p&gt;I get the following error (&amp;nbsp;&amp;nbsp;&lt;strong&gt;Reference to undeclared namespace prefix: &amp;#39;dfs&amp;#39;.&lt;/strong&gt; ) when executing this code &lt;/p&gt;&lt;p&gt;XDocument.UI.Alert(eventObj.Source.selectSingleNode(&amp;quot;/dfs:myFields/dfs:dataFields/s0:GetSCMAAccountsResponse/s0:GetSCMAAccountsResult/ns1:SqlRowSet1/ns1:row1/ns1:scmaaccount&amp;quot;).text);&lt;/p&gt;&lt;p&gt;&amp;nbsp;I&amp;#39;m not specifying the array index of the repeating table, but should&amp;#39;nt it pull the first one anyway?&lt;/p&gt;&lt;p&gt;here is the xpath for the field I want : &amp;quot;/dfs:myFields/dfs:dataFields/s0:GetSCMAAccountsResponse/s0:GetSCMAAccountsResult/ns1:SqlRowSet1/ns1:row1/ns1:scmaaccount&amp;quot;&lt;/p&gt;&lt;p&gt;here is the namespace declarations: XDocument.DOM.setProperty(&amp;quot;SelectionNamespaces&amp;quot;, &amp;#39;&lt;br /&gt;xmlns:xsi=&amp;quot;&lt;a href="http://www.w3.org/2001/XMLSchema-instance"&gt;http://www.w3.org/2001/XMLSchema-instance&lt;/a&gt;&amp;quot; &lt;br /&gt;xmlns:q=&amp;quot;&lt;a href="http://schemas.microsoft.com/office/infopath/2003/ado/queryFields"&gt;http://schemas.microsoft.com/office/infopath/2003/ado/queryFields&lt;/a&gt;&amp;quot; &lt;br /&gt;xmlns:d=&amp;quot;&lt;a href="http://schemas.microsoft.com/office/infopath/2003/ado/dataFields"&gt;http://schemas.microsoft.com/office/infopath/2003/ado/dataFields&lt;/a&gt;&amp;quot; &lt;br /&gt;xmlns:dfs=&amp;quot;&lt;a href="http://schemas.microsoft.com/office/infopath/2003/dataFormSolution"&gt;http://schemas.microsoft.com/office/infopath/2003/dataFormSolution&lt;/a&gt;&amp;quot; &lt;br /&gt;xmlns:xdado=&amp;quot;&lt;a href="http://schemas.microsoft.com/office/infopath/2003/adomapping"&gt;http://schemas.microsoft.com/office/infopath/2003/adomapping&lt;/a&gt;&amp;quot; &lt;br /&gt;xmlns:s0=&amp;quot;&lt;a href="http://tempuri.org"&gt;http://tempuri.org&lt;/a&gt;&amp;quot; &lt;br /&gt;xmlns:sqltypes=&amp;quot;&lt;a href="http://schemas.microsoft.com/sqlserver/2004/sqltypes"&gt;http://schemas.microsoft.com/sqlserver/2004/sqltypes&lt;/a&gt;&amp;quot; &lt;br /&gt;xmlns:sqlsoaptypes=&amp;quot;&lt;a href="http://schemas.microsoft.com/sqlserver/2004/SOAP/types"&gt;http://schemas.microsoft.com/sqlserver/2004/SOAP/types&lt;/a&gt;&amp;quot; xmlns:sqlresultstream=&amp;quot;&lt;a href="http://schemas.microsoft.com/sqlserver/2004/SOAP/types/SqlResultStream"&gt;http://schemas.microsoft.com/sqlserver/2004/SOAP/types/SqlResultStream&lt;/a&gt;&amp;quot; xmlns:sqlmessage=&amp;quot;&lt;a href="http://schemas.microsoft.com/sqlserver/2004/SOAP/types/SqlMessage"&gt;http://schemas.microsoft.com/sqlserver/2004/SOAP/types/SqlMessage&lt;/a&gt;&amp;quot; xmlns:sqlrowcount=&amp;quot;&lt;a href="http://schemas.microsoft.com/sqlserver/2004/SOAP/types/SqlRowCount"&gt;http://schemas.microsoft.com/sqlserver/2004/SOAP/types/SqlRowCount&lt;/a&gt;&amp;quot; xmlns:sqltransaction=&amp;quot;&lt;a href="http://schemas.microsoft.com/sqlserver/2004/SOAP/types/SqlTransaction"&gt;http://schemas.microsoft.com/sqlserver/2004/SOAP/types/SqlTransaction&lt;/a&gt;&amp;quot; xmlns:_xdns0=&amp;quot;&lt;a href="http://schemas.microsoft.com/office/infopath/2003/changeTracking"&gt;http://schemas.microsoft.com/office/infopath/2003/changeTracking&lt;/a&gt;&amp;quot; &lt;br /&gt;xmlns:ns1=&amp;quot;urn:schemas-microsoft-com:sql:SqlRowSet1&amp;quot; &lt;br /&gt;xmlns:SOAP-ENV=&amp;quot;&lt;a href="http://schemas.xmlsoap.org/soap/envelope/"&gt;http://schemas.xmlsoap.org/soap/envelope/&lt;/a&gt;&amp;quot; &lt;br /&gt;xmlns:sql=&amp;quot;&lt;a href="http://schemas.microsoft.com/sqlserver/2004/SOAP"&gt;http://schemas.microsoft.com/sqlserver/2004/SOAP&lt;/a&gt;&amp;quot; &lt;br /&gt;xmlns:msdata=&amp;quot;urn:schemas-microsoft-com:xml-msdata&amp;quot; &lt;br /&gt;xmlns:my=&amp;quot;&lt;a href="http://schemas.microsoft.com/office/infopath/2003/myXSD/2007-08-14T17:04:14"&gt;http://schemas.microsoft.com/office/infopath/2003/myXSD/2007-08-14T17:04:14&lt;/a&gt;&amp;quot; &lt;br /&gt;xmlns:xd=&amp;quot;&lt;a href="http://schemas.microsoft.com/office/infopath/2003&amp;quot;&amp;#39;"&gt;http://schemas.microsoft.com/office/infopath/2003&amp;quot;&amp;#39;&lt;/a&gt;);&lt;/p&gt;</description></item></channel></rss>