<?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: Fill a queryField from another file</title><link>https://www.infopathdev.com:443/forums/thread/14571.aspx</link><pubDate>Mon, 29 May 2006 06:07:26 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14571</guid><dc:creator>gregv</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14571.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14571</wfw:commentRss><description>Sorry for my late answer but I was on hollidays for 4 days.&lt;br /&gt;So I tried this morning your solution Abhishek and it works.&lt;br /&gt;Thank you for your help :)</description></item><item><title>Re: Fill a queryField from another file</title><link>https://www.infopathdev.com:443/forums/thread/14570.aspx</link><pubDate>Thu, 25 May 2006 05:06:52 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14570</guid><dc:creator>Abhishek</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14570.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14570</wfw:commentRss><description>Hi gregv,&lt;br /&gt;On the click of a button(in a row ) of a repeating table, if u need to access the value of a control in the same row, then u need to use&lt;br /&gt;n1=eventObj.Source.selectSingleNode("&amp;lt;Field name&amp;gt;");&lt;br /&gt;&lt;br /&gt;Note that &amp;lt;FieldName&amp;gt; is not the whole XPath of that field,but just the particular field's name only.&lt;br /&gt;&lt;br /&gt;Just check out the following link &lt;br /&lt;a target="_blank" href=http://www.infopathdev.com/forums/topic.asp?TOPIC_ID=1986&amp;SearchTerms=e.Source&gt;http://www.infopathdev.com/forums/topic.asp?TOPIC_ID=1986&amp;SearchTerms=e.Source&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;Abhishek</description></item><item><title>Re: Fill a queryField from another file</title><link>https://www.infopathdev.com:443/forums/thread/14569.aspx</link><pubDate>Wed, 24 May 2006 15:36:32 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14569</guid><dc:creator>gregv</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14569.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14569</wfw:commentRss><description>Thanks, it works.&lt;br /&gt;But I found another problem, the value contained in n1.text is always the same, even if I click on different lines. Do I have to specify something else in the first selectSingleNode to precise to use the current line ?</description></item><item><title>Re: Fill a queryField from another file</title><link>https://www.infopathdev.com:443/forums/thread/14568.aspx</link><pubDate>Wed, 24 May 2006 15:24:27 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14568</guid><dc:creator>Matt Faus</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14568.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14568</wfw:commentRss><description>You will have to tell the node about the namespace that you are using, try this immediatly after NewFromSolution():&lt;br /&gt;&lt;br /&gt;xd.setProperty("SelectionNamespaces", 'xmlns:dfs="http://schemas.microsoft.com/office/infopath/2003/dataFormSolution" ' );</description></item><item><title>Fill a queryField from another file</title><link>https://www.infopathdev.com:443/forums/thread/12872.aspx</link><pubDate>Wed, 24 May 2006 13:35:14 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:12872</guid><dc:creator>gregv</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/12872.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=12872</wfw:commentRss><description>Hello&lt;br /&gt;I've got an extensible table wich has on each line a button.&lt;br /&gt;This button has to open another infopath file and make a query depending on the line it was activated.&lt;br /&gt;The files are both linked to a SQLserver database. Here is the code put on the button :&lt;br /&gt;&lt;pre&gt;function CTRL63_7::OnClick(eventObj)&lt;br /&gt;{&lt;br /&gt;	var n1 = null;&lt;br /&gt;	n1 = XDocument.DOM.selectSingleNode("/dfs:myFields/dfs:dataFields/d:co_refdevis/@do_id");&lt;br /&gt;	&lt;br /&gt;	var xd = null;&lt;br /&gt;	xd = Application.XDocuments.NewFromSolution("V:\\...\\FileToOpen.xsn");&lt;br /&gt;	&lt;br /&gt;	var n2 = null;&lt;br /&gt;	n2 = xd.DOM.selectSingleNode("/dfs:myFields/dfs:queryFields/q:co_dossiers/@do_id");&lt;br /&gt;	&lt;br /&gt;	n2.text = n1.text;&lt;br /&gt;	xd.Query();&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;When I click on a button, it opens the file correctly but throws an error (translated from french) : &lt;b&gt;Reference to non-declared prefix space : dfs&lt;/b&gt;&lt;br /&gt;In debug, the error occurs on the line &lt;b&gt;n2 = xd.DOM.selectSingleNode(...);&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;I don't understand because the two files are both based on SQLserver and dfs appears in both when i use formula.&lt;br /&gt;Do someone knows what causes this error please ?&lt;br /&gt;&lt;br /&gt;Thanks in advance.</description></item></channel></rss>