<?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>General</title><link>https://www.infopathdev.com:443/forums/41.aspx</link><description>If you're not sure where to ask your question, ask it here. If necessary, our moderators will make sure it gets classified in the correct board.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: calculated value in a repeating section that uses a Data connection to query a SharePoint list is displaying multiple instances of the same value instead of multiple instances of different values</title><link>https://www.infopathdev.com:443/forums/thread/109318.aspx</link><pubDate>Wed, 01 Feb 2017 15:50:31 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:109318</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/109318.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=109318</wfw:commentRss><description>Probably need to have &amp;quot;current&amp;quot; in here - where is the calculated value displayed? If it is in a section or table bound to the main DS my:SharePointListItem_RW field, for example, the expression would be: xdXDocument:GetDOM(&amp;quot;Contracts&amp;quot;)/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:Contract_x0020_Number[../d:ID = current()/my:Linked_x0020_Contracts/Value]</description></item><item><title>calculated value in a repeating section that uses a Data connection to query a SharePoint list is displaying multiple instances of the same value instead of multiple instances of different values</title><link>https://www.infopathdev.com:443/forums/thread/109301.aspx</link><pubDate>Tue, 31 Jan 2017 14:38:49 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:109301</guid><dc:creator>Johangir</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/109301.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=109301</wfw:commentRss><description>Hi - I havn&amp;#39;t been using InfoPAth for long and I&amp;#39;ve inherited some quite complex forms. We have a bug where by a calculated value in a repeating section that uses a Data connection to query a SharePoint list is displaying multiple instances of the same value instead of multiple instances of different values

To explain - the Contracts list has a contract item with 3 linked contracts in the Linked Contract column:

Linked Contracts column (in Contracts List):
C/2017/0022;
C/2017/0023; 
C/2017/0024


When a user opens the form the Calculated Value shows this:
C/2017/0022;
C/2017/0022;
C/2017/0022;

This is the xpath that is being used:

xdXDocument:GetDOM(&amp;quot;Contracts&amp;quot;)/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:Contract_x0020_Number[../d:ID = xdXDocument:get-DOM()/dfs:myFields/dfs:dataFields/my:SharePointListItem_RW/my:Linked_x0020_Contracts/Value]

So it is querying the Contracts list by current Contract number and should be returning the Values of the Linked Contracts column

This is how I understand it - but as I said I am quite new it this and still trying to get my head round it all

So my question is - why is it showing only the first Linked Contract 3 times instead of the 3 Linked contracts? And how do I fix it?

If anyone can help - that would be great - I&amp;#39;m abit stuck

Cheers
Jonj</description></item></channel></rss>