Repeating and Non-Repeating Sections and Fields from a SharePoint List - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Repeating and Non-Repeating Sections and Fields from a SharePoint List

Last post 10-14-2019 07:17 AM by ktitchard. 9 replies.
Page 1 of 1 (10 items)
Sort Posts: Previous Next
  • 07-23-2019 12:24 AM

    Repeating and Non-Repeating Sections and Fields from a SharePoint List

    Hi all, today I have decided to play with repeating sections. My goal is to create a form where a user can request multiple virtual machines to be built in VMWare. I would like to create a SharePoint List form with 3 sections. The first section is customer details such as name, department, cost centres etc. (the usual admin stuff). The second section which is going to be my repeating section will have information such as Virtual Machine name, no of vCPUs, vRAM etc. And finally the last section will be for the tech department to assign an IP Address, Domain Name etc. which will be hidden using another form view. As I am integrating with MS Orchestrator which monitors the SharePoint List, I need each Virtual Machine Request from the repeating section to be created as an additional record in the SharePoint List (containing all data on the form obviously). MS Orchestrator then collects the data from the list for each virtual machine and runs scripts to start deployment.

    So.. I have created a list and created a new Blank Form in InfoPath and assigned a data connection to my SharePoint Server and List. My issue is every field I drag across from my field list in InfoPath creates a repeating section with that control. What I would like to do is have fields/controls in my first and last section non-repeating, but I am struggling. I know this might be a newbie question but I am a newbie.

    Is this possible to achieve?

    Thanks 

  • 07-23-2019 08:38 AM In reply to

    Re: Repeating and Non-Repeating Sections and Fields from a SharePoint List

     For your fields that will be different for each record, drag the repeating group from the schema (you will need to show the advanced view in your data source task pane) onto the form - put all the fields you want to have with unique data in there. For the fields that will be the same, you can also drag the repeating group, and add the fields, but then you can use conditional formatting to hide all but the first instance of the group - I think the expression will be something like: count(preceding-sibling::my:SharePointListItem_RW) > 0

    You'll need rules on submit to set all the instances of the "same" fields to the values entered for the first record.

    Another option would be to include an XML data source in your form as a secondary data source, use that for data entry in the non-repeating fields, and then set all instanced of the repeating fields on submit.... you'll also need form load rules to populate those when the user re-opens the form. 

    Hilary Stoupa

  • 09-24-2019 08:18 AM In reply to

    Re: Repeating and Non-Repeating Sections and Fields from a SharePoint List

     Hi. I don't know if I am doing this correctly but I have a form with a repeating section that I am trying to save to a sharepoint list. I have a non repeating section in the same form and I need each entry of the repeating section to inherit all fields of the non repeating section.  I am using this formula count(preceding-sibling::my:SharePointListItem_RW) > 0 but it is not work.  Any help would be appreciated.  Thanks

  • 09-25-2019 07:47 AM In reply to

    Re: Repeating and Non-Repeating Sections and Fields from a SharePoint List

    The count formula would just return a true or false value - so I'm guessing that is what you are using for formatting the section? On your submit rules, just set the fields to the value of the field in the non-repeating section - XPath should get the first instance of the repeating node, and then the way InfoPath works, it would set all instances. Feel free to attach a copy of your form under the options tab in a reply if you need a hand.
    Hilary Stoupa

  • 09-25-2019 07:59 AM In reply to

    Re: Repeating and Non-Repeating Sections and Fields from a SharePoint List

     Attached is my file. I am fairly new to submit rules for a repeating section. If you look at the non repeating section, it has 4 fields that I am trying to carry down to every instance of the repeating section in the sharepoint list. Thanks

  • 09-25-2019 08:08 AM In reply to

    Re: Repeating and Non-Repeating Sections and Fields from a SharePoint List

     If you look at the list, those fields are empty on the 1st repeat of the repeating section and I am trying to get them to carry down every time someone inserts a new item on the form. Thank you for all of your help


  • 09-25-2019 08:37 AM In reply to

    Re: Repeating and Non-Repeating Sections and Fields from a SharePoint List

    Save the attached file locally. Right click the file and select Design to open in design mode - from there you can preview. I added a test area so you can try the logic out and a screenshot showing you where to find the submit rules.
    Hilary Stoupa

  • 09-25-2019 09:06 AM In reply to

    Re: Repeating and Non-Repeating Sections and Fields from a SharePoint List

     You are awesome. I feel so dumb that it was that simple. Thank you so much!!!

  • 09-25-2019 09:12 AM In reply to

    Re: Repeating and Non-Repeating Sections and Fields from a SharePoint List

    Don't feel dumb! Some of this stuff doesn't make a lot of sense until you've tried it a bit. Do make sure this all is behaving as you'd expect when editing items (if users will be editing).
    Hilary Stoupa

  • 10-14-2019 07:17 AM In reply to

    Re: Repeating and Non-Repeating Sections and Fields from a SharePoint List

     Hi all

     Sorry I got side tracked onto another project at work lol. Anyway I am back on this. I re-read what I originally typed and I think I need to reword it lol. For example we will use 4 virtual servers

    1. The user fills out a few fields like department name, billing etc

    2. They complete the technical fields for the 1st server

    3. They then add repeating sections to add another 3 servers

    4. When they click submit the repeating sections are submitted as 3 different requests which include the fields in part 1.

    We end up with 4 records with the same admin data, but each have their own server details 

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