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 - InfoPath Dev
in

InfoPath Dev

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

Last post 02-01-2017 07:50 AM by Hilary Stoupa. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 01-31-2017 06:38 AM

    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

    Hi - I havn't been using InfoPAth for long and I'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("Contracts")/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'm abit stuck Cheers Jonj
  • 02-01-2017 07:50 AM In reply to

    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

    Probably need to have "current" 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("Contracts")/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:Contract_x0020_Number[../d:ID = current()/my:Linked_x0020_Contracts/Value]
    Hilary Stoupa

Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.