De-concatenating a SharePoint list item to populate a repeating table in infopath - InfoPath Dev
in

InfoPath Dev

De-concatenating a SharePoint list item to populate a repeating table in infopath

Last post 02-20-2017 07:24 AM by Hilary Stoupa. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 02-14-2017 07:27 PM

    • DrDSP
    • Not Ranked
    • Joined on 02-14-2017
    • Posts 1

    De-concatenating a SharePoint list item to populate a repeating table in infopath

    Hi all, I sure hope you can provide me with some insight on this one because it has me stumped. The Background: I have 2 forms; "Project descriptions" and "Progress reports". I am using these to track a large number of different projects from different users. The Project description form has a number of fields, including a Project ID field and a repeating table with the following fields: - Milestone (text field) - Milestone date (date picker) This Project description form populates a SharePoint Document Library. As is normally the case, the repeating table in this form merges the different entries into a single item in the SharePoint library list. The Problem: The Progress Report form contains numerous fields. In particular, it has a drop down menu allowing the user to select a Project ID number (pulled from the SharePoint list). In addition, there is a repeating table with the following fields: - Milestone (text field) - Milestone date (date picker) - Forecast/Actual date (date picker) - % complete - Status I need the Milestone and Milestone date fields in the Progress Reports to be populated with Milestone and Milestone dates from the Project descriptions when the user selects the appropriate Project ID number. The Approach: My initial plan of attack was to create 2 hidden text fields in the Project Description form (one for Milestone and one for Milestone Date). These hidden fields concatenate the rows in the repeating table, adding a "|" in between each item, which would then populate my SharePoint library list. My idea was to then extract these concatenated list items from SharePoint, filtered by Project ID number (as chosen by the user in a drop down menu in the Progress Report), separate them and then populate the repeating table in the Progress Report. Unfortunately, I am unable to "deconcatenate" the items in the SharePoint list, nor am I able to programmatically feed the deconcatenated items into the repeating table in the Progress Report. Does anyone have any ideas on how I could achieve this? Or a more elegant solution? I am not particularly code savvy (but am willing to try).
  • 02-20-2017 07:24 AM In reply to

    Re: De-concatenating a SharePoint list item to populate a repeating table in infopath

     You will definitely have to use code for this (or try qRules) - I think the easiest approach would be to have an XML file data connection to a single form in the Project Description library, and when the user selects a project, change that data connection to point to the correct file, then execute the query. That gets you back your repeating data as XML, and you don't have to fuss around trying to split strings. In your code, you can then loop through the repeating rows from your Project Description and add new rows to your Project Report accordingly. Make sense?

    Hilary Stoupa

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