Display output from Powershell script into a repeating table - InfoPath Dev
in

InfoPath Dev

Display output from Powershell script into a repeating table

Last post 02-01-2017 02:35 AM by bkwhodgson. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 01-25-2017 02:57 AM

    Display output from Powershell script into a repeating table

    I have a challenging requirement that I'm not even sure if it is possible. I'm using SharePoint 2013 and InfoPath 2013.

    I have a form library, that uses a browser enabled form to collect the following information:

    'Standard' fields: user, line manager

    In a repeating table: System, Access Level, Approver

    Please note the approver field is automatically populated from a lookup to another SharePoint list (a list called Access Levels which stores each access level and its approver) - this isn't working correctly (the wrong approvers are being retrieved) and I've actually got a different open post in this forum for that problem.

    The submitted results go to a SharePoint form library. The Repeating table has some (hidden) fields that concatenate the above information and a semi colon. I then have a Powershell script that takes the string value from each of the SharePoint columns that are promoted from the repeating table - it splits the string at each semi colon - adds it to an array and this array is then used to create new list items in a new list. So if the repeating table in the original form library has 4 entries there will be 4 list items created. This all worked fine (except for the incorrectly matched approvers) but I have been given a new requirement - instead of creating a new list item for each row of the repeating table, I need to group these by the approver.

    So if I have a repeating table with 4 entries - 2 rows for 2 different approver I now need to create 2 "list items" - one per approver. In each of the 2 list items, there will need to be a repeating table to hold the 2 rows that belong to a given approver. The list in this case would need to be a form library, but I have no idea how I can modify my Powershell script to create a list item in a form library that an InfoPath form would look at 2 columns and display their values in a repeating table. I know how I would use my Powershell script to group things per approver - but then how would InfoPath display what would be a string (with a couple of semi colons in it) in a repeating table. The next part of the process would be for the approver to open the new form and either approve/reject each row of the new repeating table.

    I suppose the question I'm asking is - if I have a list item with 4 fields all containing string information, where there are semi colons within this string, how can I display this in a repeating table whereby the string goes to a new row with every semi colon?

    Filed under:
  • 02-01-2017 02:35 AM In reply to

    Re: Display output from Powershell script into a repeating table

     To close the above question - I found an alternate way of achieving what was required without doing what I was intending to do in my above question - the alternative negated the need to get things into a second repeating table.

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