<?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: Retrieve Values on the form</title><link>https://www.infopathdev.com:443/forums/thread/14301.aspx</link><pubDate>Tue, 21 Feb 2006 18:14:09 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14301</guid><dc:creator>ek38</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14301.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14301</wfw:commentRss><description>Matt,&lt;br /&gt;&lt;br /&gt;After going through the tutorial, we figured out why we were getting the error on line you suggested.  All that was missing to make your suggestoin work was an "@comments" instead of just "comments".&lt;br /&gt;&lt;br /&gt;When we click on properties of comments and go to the details tab, it stated comments was an attribute and did not give a namespace.  This field is pulled from a database., i.e. we did not create the field.&lt;br /&gt;&lt;br /&gt;Are all fields that are linked to a database always attribute fields?  In the tutorial, the suggestion was to stay away from attribute fields and create elements instead.  &lt;br /&gt;&lt;br /&gt;Your thougths?&lt;br /&gt;&lt;br /&gt;Thanks again for the suggestions.</description></item><item><title>Re: Retrieve Values on the form</title><link>https://www.infopathdev.com:443/forums/thread/14300.aspx</link><pubDate>Thu, 16 Feb 2006 20:56:36 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14300</guid><dc:creator>ek38</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14300.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14300</wfw:commentRss><description>Matt,&lt;br /&gt;&lt;br /&gt;Thanks for the response.  I am in the process of going through the tutorial.  Thanks for the tip.&lt;br /&gt;&lt;br /&gt;We put the code in and we get the following message:&lt;br /&gt;The following error occurred:&lt;br /&gt;Object required&lt;br /&gt;File:script.js&lt;br /&gt;Line:133&lt;br /&gt;&lt;br /&gt;I'm troubleshooting now any suggestions would be appreciated.  Is there supporting code that is needed that perhaps creates the XDocument object?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote id="quote"&gt;&lt;font size="1" face="Verdana, Arial, Helvetica" id="quote"&gt;quote:&lt;hr height="1" noshade id="quote"&gt;&lt;i&gt;Originally posted by MFaus&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;First, check out this awesome XPath tutorial:&lt;a target="_blank" href=http://www.w3schools.com/xpath/default.asp&gt;http://www.w3schools.com/xpath/default.asp&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;To fix your XPath, try this statement instead:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;XDocument.UI.Alert(XDocument.DOM.selectSingleNode( "/dfs:myFields/dfs:dataFields/d:NEWJOB/comments").text);&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;This will get the first comments node from the NEWJOB group.  If you are trying to find a particular node in that group (say, if it's repeating) then you will need to use a node test, which you should learn about in the tutorial above.&lt;br /&gt;&lt;br /&gt;I hope this helps, good luck!&lt;br /&gt;&lt;br /&gt;---------------&lt;br /&gt;Matt Faus&lt;br /&gt;InfoPath Dev Texas&lt;br /&gt;&lt;br /&gt;&lt;hr height="1" noshade id="quote"&gt;&lt;/font id="quote"&gt;&lt;/blockquote id="quote"&gt;</description></item><item><title>Re: Retrieve Values on the form</title><link>https://www.infopathdev.com:443/forums/thread/14299.aspx</link><pubDate>Thu, 16 Feb 2006 17:39:28 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14299</guid><dc:creator>Matt Faus</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14299.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14299</wfw:commentRss><description>First, check out this awesome XPath tutorial:&lt;a target="_blank" href=http://www.w3schools.com/xpath/default.asp&gt;http://www.w3schools.com/xpath/default.asp&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;To fix your XPath, try this statement instead:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;XDocument.UI.Alert(XDocument.DOM.selectSingleNode( "/dfs:myFields/dfs:dataFields/d:NEWJOB/comments").text);&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;This will get the first comments node from the NEWJOB group.  If you are trying to find a particular node in that group (say, if it's repeating) then you will need to use a node test, which you should learn about in the tutorial above.&lt;br /&gt;&lt;br /&gt;I hope this helps, good luck!&lt;br /&gt;&lt;br /&gt;---------------&lt;br /&gt;Matt Faus&lt;br /&gt;InfoPath Dev Texas&lt;br /&gt;</description></item><item><title>Retrieve Values on the form</title><link>https://www.infopathdev.com:443/forums/thread/12777.aspx</link><pubDate>Thu, 16 Feb 2006 13:54:48 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:12777</guid><dc:creator>ek38</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/12777.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=12777</wfw:commentRss><description>This sound simple, but I don't have a great familiarity with JS or XML.&lt;br /&gt;&lt;br /&gt;I have a field in my form tied to a data source.  The path in the datasource looks like myFields&amp;gt;dataFields&amp;gt;d:NEWJOB&amp;gt;:comments&lt;br /&gt;&lt;br /&gt;I am using the command 		&lt;br /&gt;XDocument.UI.Alert(getNodeValue("/d:NewJob/d:comments", "Howdy"));&lt;br /&gt;&lt;br /&gt;I have tried several different combinations of the xpath unsuccessfully.  I don't understand how the xpath works.  Here is the line in the top of the scripting code.&lt;br /&gt;&lt;br /&gt;//&amp;lt;namespacesDefinition&amp;gt;&lt;br /&gt;XDocument.DOM.setProperty("SelectionNamespaces", 'xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:q="http://schemas.microsoft.com/office/infopath/2003/ado/queryFields" xmlns:d="http://schemas.microsoft.com/office/infopath/2003/ado/dataFields" xmlns:dfs="http://schemas.microsoft.com/office/infopath/2003/dataFormSolution" xmlns:my="http://schemas.microsoft.com/office/infopath/2003/myXSD/2006-02-03T21:59:21" xmlns:xd="http://schemas.microsoft.com/office/infopath/2003"');&lt;br /&gt;//&amp;lt;/namespacesDefinition&amp;gt;&lt;br /&gt;&lt;br /&gt;The form template is stored in SharePoint.  I don't know if that makes a difference.&lt;br /&gt;&lt;br /&gt;Am I making this too complicatied?  I'm just trying to display a value of a field on my form to a dialog box.  &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;</description></item></channel></rss>