<?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>SharePoint Integration</title><link>https://www.infopathdev.com:443/forums/46.aspx</link><description> For questions concerning issues in the integration of SharePoint and Microsoft InfoPath.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: SharePoint list / InfoPath labels</title><link>https://www.infopathdev.com:443/forums/thread/21787.aspx</link><pubDate>Wed, 18 Jul 2007 20:13:32 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:21787</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/21787.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=46&amp;PostID=21787</wfw:commentRss><description>Great! Glad to hear you got it working. Good sluething!</description></item><item><title>Re: SharePoint list / InfoPath labels</title><link>https://www.infopathdev.com:443/forums/thread/21728.aspx</link><pubDate>Tue, 17 Jul 2007 12:05:23 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:21728</guid><dc:creator>skrile</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/21728.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=46&amp;PostID=21728</wfw:commentRss><description>&lt;p&gt;Woo Hoo.&amp;nbsp; Played some more and got this working!&lt;/p&gt;&lt;p&gt;&lt;em&gt;var selectedNode = objTranslation.selectSingleNode(&amp;quot;//dfs:myFields/dfs:dataFields/dfs:ThirdPartyEvent_Translations/@Translation[../@stringID = &amp;#39;user_sectionhead&amp;#39; and ../@languageid = &amp;#39;en&amp;#39;]&amp;quot;) &lt;/em&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;And then the translation can be referenced with:&lt;/p&gt;&lt;p&gt;&lt;em&gt;selectedNode.text&lt;/em&gt;&lt;/p&gt;&lt;p&gt;So, that&amp;#39;s good.&amp;nbsp; Now to figure out how to loop through each stringID in the ThirdPartyEvent....(figured this out over here:&amp;nbsp; &lt;a href="http://www.infopathdev.com/forums/permalink/21731/21747/ShowThread.aspx#21747"&gt;http://www.infopathdev.com/forums/permalink/21731/21747/ShowThread.aspx#21747&lt;/a&gt;&lt;a href="http://www.infopathdev.com/forums/thread/21731.aspx"&gt;&lt;/a&gt;)&lt;/p&gt;</description></item><item><title>Re: SharePoint list / InfoPath labels</title><link>https://www.infopathdev.com:443/forums/thread/21726.aspx</link><pubDate>Tue, 17 Jul 2007 11:36:43 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:21726</guid><dc:creator>skrile</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/21726.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=46&amp;PostID=21726</wfw:commentRss><description>&lt;p&gt;I&amp;#39;ve tried several version of that statement including:&lt;/p&gt;&lt;p&gt;if (selectedNode.selectSingleNode(&amp;quot;Translation&amp;quot;) == null)&lt;/p&gt;&lt;p&gt;and recieve the same Null error.&amp;nbsp; I&amp;#39;m wondering whether the syntax for selectedNode is corret.&amp;nbsp; Does it look correct to you?&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;em&gt;var selectedNode = objTranslation.selectSingleNode(&amp;quot;//dfs:myFields/dfs:dataFields/d:ThirdPartyEvent_Translations[../@stringid=&amp;#39;user_username&amp;#39; and ../@languageid=&amp;#39;&amp;quot; +&amp;nbsp;selectedLanguage + &amp;quot;&amp;#39;]&amp;quot;) &lt;br /&gt;&lt;/em&gt;&lt;/p&gt;</description></item><item><title>Re: SharePoint list / InfoPath labels</title><link>https://www.infopathdev.com:443/forums/thread/21712.aspx</link><pubDate>Mon, 16 Jul 2007 23:00:40 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:21712</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/21712.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=46&amp;PostID=21712</wfw:commentRss><description>&lt;p&gt;You are trying to get to a property of a null object: {NODE}.text, where {NODE} is the selectSingleNode stuff, and the .text is the property on that node.&lt;/p&gt;&lt;p&gt;If {NODE} is null, then accessing .text is invalid.&lt;/p&gt;&lt;p&gt;So your test should be:&lt;/p&gt;&lt;p&gt;if (selectedNode.selectSingleNode(&amp;quot;Translation&amp;quot;) == null)&lt;/p&gt;</description></item><item><title>SharePoint list / InfoPath labels</title><link>https://www.infopathdev.com:443/forums/thread/21703.aspx</link><pubDate>Mon, 16 Jul 2007 19:05:22 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:21703</guid><dc:creator>skrile</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/21703.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=46&amp;PostID=21703</wfw:commentRss><description>&lt;p&gt;I am currently working on a project for my company and am building an Infopath 2003 document that needs to be accessible by many languages around the world.&amp;nbsp; Taking a page from my web design thinking, I was working toward a solution where the translations for my Infopath document would be stored in a Sharepoint list, accessed through a data connection, and the matching values would be &amp;quot;mapped&amp;quot; to various expression boxes that look to the user to be Lables.&lt;/p&gt;&lt;p&gt;My Sharepoint translation list (ThirdPartyEvent_Translations)&amp;nbsp;has the following attributes:&amp;nbsp; &lt;br /&gt;* stringid&lt;br /&gt;* languageid&lt;br /&gt;* translation&lt;/p&gt;&lt;p&gt;My language choice dropdown at the top of the page has each language and their matching id&amp;#39;s (i.e. English/en, Spanish (Mexican)/es-sp).&lt;/p&gt;&lt;p&gt;So, here&amp;#39;s what works right now:&lt;br /&gt;* I have a language dropdown&lt;br /&gt;* I have a&amp;nbsp;Data connection to my sharepoint list that returns all&amp;nbsp;my values&lt;br /&gt;* I&amp;nbsp;put an Expression box on my page and set it&amp;#39;s value to a filtered result from the ThirdPartyEvent_Translations sharepoint data connection.&lt;br /&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;This was looking like it would take forever and there would be a lot of &amp;quot;hidden&amp;quot; code to manage.&amp;nbsp; It seemed to me to be smarter to create a group in my data list called Labels.&amp;nbsp; In that group I would have a list of all the StringIDs from my Sharepoint list and drag and drop those onto my form to serve as the labels for the form.&lt;/p&gt;&lt;p&gt;&amp;nbsp;This is what I want to have happen:&lt;/p&gt;&lt;p&gt;Rather than hand-coding each box on the page, I want the value of each of the text boxes populated with the matching data from my Sharepoint List.&amp;nbsp; Therefore, when a user first opens the form, I want the text boxes to all be populated with the selected value of the language dropdown and the matching language id. This is where I&amp;#39;m having my trouble.&amp;nbsp; I&amp;#39;ve gone to the code-behind and played with some syntax, but it&amp;#39;s clear I don&amp;#39;t know what I&amp;#39;m doing!&amp;nbsp; Here&amp;#39;s what I have - and is not working.&amp;nbsp; This is a specific example (trying to get the translation for one string id called &amp;quot;user_username&amp;quot;).&amp;nbsp; I envision writing some type of script that would loop through each of the Sharepoint attributes and setting the corresponding Label value on the form.&amp;nbsp; This would allow me to trigger the function either through the OnLoad event, or when the language drop down is changed.&amp;nbsp; The UI.Alerts are there just for my testing, but in the real solution I would be setting the .text value to the matching text boxes on the page (something I can do and know the syntax for ).&lt;/p&gt;&lt;p&gt;function XDocument::OnLoad(eventObj) &lt;br /&gt;&amp;nbsp;&amp;nbsp; {&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var objTranslation = XDocument.DataObjects(&amp;quot;ThirdPartyEvent_Translations&amp;quot;).DOM; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; objTranslation.setProperty(&amp;quot;SelectionNamespaces&amp;quot;,&amp;#39;xmlns:dfs=&amp;quot;http://schemas.microsoft.com/office/infopath/2003/dataFormSolution&amp;quot; &amp;#39; + &amp;#39; xmlns:d=&amp;quot;http://schemas.microsoft.com/office/infopath/2003/ado/dataFields&amp;quot;&amp;#39;); &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var selectedLanguage = XDocument.DOM.selectSingleNode(&amp;quot;/my:myFields/my:languageview&amp;quot;).text; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var selectedNode = objTranslation.selectSingleNode(&amp;quot;//dfs:myFields/dfs:dataFields/d:ThirdPartyEvent_Translations[../@stringid=&amp;#39;user_username&amp;#39; and ../@languageid=&amp;#39;&amp;quot; +&amp;nbsp;selectedLanguage + &amp;quot;&amp;#39;]&amp;quot;) &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (selectedNode.selectSingleNode(&amp;quot;Translation&amp;quot;).text == null) &lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; { XDocument.UI.Alert(&amp;#39;nope&amp;#39;); }&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else { XDocument.UI.Alert(selectedNode.selectSingleNode(&amp;quot;Translation&amp;quot;).text); } &lt;/p&gt;&lt;p&gt;&amp;nbsp; }&lt;/p&gt;&lt;p&gt;This code results in a .js error &amp;quot;&amp;#39;null&amp;#39; is null or not an object&amp;quot; on the line &amp;quot;if (selectedNode.selectSingleNode(&amp;quot;Translation&amp;quot;).text == null) &amp;quot;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I would really appreciate it if someone could face me toward the light on this one!&lt;/p&gt;</description></item></channel></rss>