Infopath - Two Secondary Data Sources = Calculation - InfoPath Dev
in

InfoPath Dev

Infopath - Two Secondary Data Sources = Calculation

Last post 07-27-2017 08:05 AM by arvindraj85. 8 replies.
Page 1 of 1 (9 items)
Sort Posts: Previous Next
  • 07-20-2017 08:24 AM

    Infopath - Two Secondary Data Sources = Calculation

    Hello - I have two secondary data sources that I pull into a separate document library. I pull these items the secondary data sources as repeating tables into the document library. I need to perform a calculation on these items pulled as repeating tables from these two secondary data sources. The calculation (Calculated field), works only on the first item of the repeating table pulled in. This is logical as the calculated field is a not part of the repeating table bound to either lists. Is there a way, to make sure that a calculated field can be created and that is repeating?
  • 07-22-2017 05:31 AM In reply to

    Re: Infopath - Two Secondary Data Sources = Calculation

     So - do you need the calculated value to repeat for each row? Or for it to take each row into account? A screenshot or a sample form (you can attach either under Options in a reply) would make this easier for me to understand. :)

    Hilary Stoupa

  • 07-23-2017 03:16 AM In reply to

    Re: Infopath - Two Secondary Data Sources = Calculation

    Thank you for your reply. Please find attached the screenshot of my sample form. The column "DPA Forecast" is from a one data source and is a repeating section. The column "DPA Blue Sky" is from another data source and is also repeating. I need to perform a calculation that sums up "DPA Forecast" and "DPA Bluesky" and is repeating as well.
  • 07-24-2017 08:29 AM In reply to

    Re: Infopath - Two Secondary Data Sources = Calculation

    Something seems off here - why are there so many nested repeating sections? Can I see your sample form?
    Hilary Stoupa

  • 07-24-2017 08:41 AM In reply to

    Re: Infopath - Two Secondary Data Sources = Calculation

    Please find attached the form. Thanks.
  • 07-24-2017 08:59 AM In reply to

    Re: Infopath - Two Secondary Data Sources = Calculation

    Attached with a new table added that will hopefully do what you need. Save locally, right click and select design, then you can preview the form. Hopefully you just need to display this data - InfoPath doesn't offer any out of the box way to copy the secondary data to the main data source - I wanted to clarify that because that was confusing for me when I first started using IP. :)
    Hilary Stoupa

  • 07-24-2017 09:48 AM In reply to

    Re: Infopath - Two Secondary Data Sources = Calculation

    Thank you very much!!. I was looking for that exact solution. You are legend!!! On a slightly different topic, 1) the data sources that I have used retrieves data from a list and displays them. Is it possible, edit the pulled data from the secondary data source so that it saves it back in the list. 2) I have a link stored in the column of the list - for example listA. Is it possible to convert the link to "Click Here" an alias and display it in another listB (listA pulled in as a secondary data source in listB)
  • 07-24-2017 09:58 AM In reply to

    Re: Infopath - Two Secondary Data Sources = Calculation

     It is possible - but can be a little tricky. Since you are using a repeating table bound to the secondary data source, as long as you are willing to submit one row at a time (i.e. put a Save button in the repeating table) and as long as you aren't on Office 365 (which restricts some SharePoint web service data connections) you can use CAML. Here's a long thread on that - http://www.infopathdev.com/forums/t/12872.aspx

    For your second question, you may need to repurpose some fields you aren't using in your secondary ds as "helper" fields. Like, you may not be displaying or using Version, or ID - you could add rules to the ID field to set the Version field to the URL value you need, and on load, after your data sources are queried, set ID to "0" (since it won't ever be 0, this changes the field and fires your rules). Then your link (under Insert > Hyperlink) can use that repurposed Version field for the "Link" field. Hope that makes sense... 

    Hilary Stoupa

  • 07-27-2017 08:05 AM In reply to

    Re: Infopath - Two Secondary Data Sources = Calculation

    Thank you very much. I tried the method listed on the thread to submit data to a list (brought in secondary data connection). I am getting the following error message. Could you please help. An error occurred while trying to connect to a Web service. An entry has been added to the Windows event log of the server. Log ID:5567 Correlation ID:f36b099e-ca7a-f02d-4c6a-d23fbb4cbfb7
Page 1 of 1 (9 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.