<?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: Build field reference in XPath using dynamically filtered list data</title><link>https://www.infopathdev.com:443/forums/thread/95806.aspx</link><pubDate>Wed, 12 Feb 2014 04:43:37 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:95806</guid><dc:creator>RaYvA</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/95806.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=46&amp;PostID=95806</wfw:commentRss><description>&lt;p&gt;I think know what you are trying to achieve, and I would suggest modifying your &amp;#39;List 2&amp;#39; structure.&amp;nbsp;Having explicitly named fields relating to years is a very bad design.&lt;/p&gt;
&lt;p&gt;I would change your list 2 structure to have 3 fields:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Item_Desc - String&lt;br /&gt;Year - Whole Number&lt;br /&gt;Cost - Currency&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Then&amp;nbsp;the items&amp;nbsp;in&amp;nbsp;List 2&amp;nbsp;would look like:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Item_Desc, Year, Cost&lt;br /&gt;Item_1, 2013, $500&lt;br /&gt;Item_1, 2014, $550&lt;br /&gt;Item_2, 2012, $100&lt;br /&gt;Item_2, 2013, $250&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;To get the cost of Item_2 for 2012 the Xpath would be:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;xdXDocument:GetDOM(&amp;quot;List_2&amp;quot;)/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:Cost[../d:Item_Desc = &amp;quot;Item_2&amp;quot; and ../d:Year = 2012]&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;That makes llokups much easier.&amp;nbsp; Obviously then you have to manage all the list item in List_2, but that should be easier than having all those explicitly named fields.&lt;/p&gt;
&lt;p&gt;Cheers&lt;/p&gt;</description></item><item><title>Build field reference in XPath using dynamically filtered list data</title><link>https://www.infopathdev.com:443/forums/thread/95427.aspx</link><pubDate>Fri, 24 Jan 2014 20:55:47 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:95427</guid><dc:creator>staticfactory</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/95427.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=46&amp;PostID=95427</wfw:commentRss><description>I am working in InfoPath 2010 with SharePoint 2010. I do not have access to any developer tools, so I&amp;#39;m pretty much limited to XPath solutions. I am also fairly new to the world if InfoPath, so please forgive me if this is &amp;quot;way out there&amp;quot;.

I am using 2 SharePoint lists as data sources.

The form is built around List_1 and I am using List_2 as a place to look up Cost information.

In List_2, there are is a column for Item_Description and different columns for yearly Costs and the like. Example: Item_Desc, 2012_Cost, 2013_Cost, 2014_Cost, etc. 

There is a Year field on the form (from List_1) that I wish to pass to the Filter to pull the respective cost from List_2.  For example, if the year on the form is 2014, I want to pull the 2014_Cost for the Item_Desc in question.

This is a logical representation of what I&amp;#39;m trying to do -- note the attempt to concat the column name together using the Year field and some text:

(../my:Number_of_Units) * xdXDocument:GetDOM(&amp;quot;List_2&amp;quot;)/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:concat((../my:Year),&amp;quot;_Cost&amp;quot;)[../d:Title = &amp;quot;Item_Name&amp;quot;]

Is this possible? 

edit: Sorry, I&amp;#39;m not sure how to format my post?</description></item></channel></rss>