submit repeating and non repeating fields to sharepoint list - InfoPath Dev
in

InfoPath Dev

submit repeating and non repeating fields to sharepoint list

Last post 12-15-2016 05:08 PM by Nate003. 13 replies.
Page 1 of 1 (14 items)
Sort Posts: Previous Next
  • 11-07-2012 06:46 AM

    submit repeating and non repeating fields to sharepoint list

    Hi,

     I have a form which has non-repeating fields, but then has a section of repeating fields. All of these fields are a column in the SharePoint list. So basically, if an employee is trying to order 6 different pieces of material from the same subcontractor they fill out one of these forms. In the SP list I want to see 6 line items, but I do not want the employee filling the form out to have to write in the "non-repeating" fields 6 times.

    Is there a way to do this using QRules?

     Thanks,


    Whitney

  • 11-07-2012 08:44 AM In reply to

    Re: submit repeating and non repeating fields to sharepoint list

    Yes, this is possible. When using the mapping tool to map your form fields to the SharePoint list, you can use relative paths to point to fields outside of the repeating node. So, for example, let's say the my:subcontractor node is at the root:

    my:myFields/my:subcontrator

    And you have a repeating group at

    my:myFields/my:subcontrator/my:itemsContainerGroup/my:itemsRepeatingGroup

    Your mapping tool would have the checkbox for "repeating data" checked and the repeating node would be this one above.

    However, when mapping to a Sharepoint column for the subcontractor, you can type in the xpath manually, like this:

    ../../my:subcontractor

    Hope that helps!

    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™


  • 11-07-2012 08:46 AM In reply to

    Re: submit repeating and non repeating fields to sharepoint list

    You bet - it can be done, but you have to hand enter the relative XPath to the field in the mapping tool when you create the mapping. So, if your data structure was:

    my:myFields
         my:CompanyName
         my:group
              my:repeatingGroup
                   my:OtherFields

     And you were mapping my:repeatingGroup for your repeating group in the mapping tool, you could add a line to map my:CompanyName, but you'd hand enter the relative XPath to the field:
    ../../my:CompanyName

    The relative path will depend on your data structure, of course. One way to find it would be to temporarily add a rule to your repeating group, and add a condition to the rule. Select the field you need the relative path for in the first drop down for creating a condition. Then change that first drop down to "The expression" and InfoPath will display the relative path in the field to the right of the drop down.

    Edited to add - Ernesto beat me to it - but I'm leaving this up since it describes how to make IP help you figure out the relative path.

    Hilary Stoupa

  • 11-07-2012 09:42 AM In reply to

    Re: submit repeating and non repeating fields to sharepoint list

    Alright. I thought I understood what you said.

     When I mapped it, I checked the box for "Data is from repeating group" and entered my repeating group in the box below.

    Below that I entered each Form Field (both repeating and non repeating). I have the right paths and I have it submitting. My problem is that say I have two items in the repeating part, instead of have the non-repeating information in both of those line items as well, it creates a third line item for the non-repeating information. I hope that makes sense.

    I tried inserting another SharePoint Mapping for just the non-repeating fields and that didn't work either.

    Any ideas?

     Thanks

  • 11-07-2012 09:50 AM In reply to

    Re: submit repeating and non repeating fields to sharepoint list

    Under the options tab you can attach a file. Can you attach a screen shot of the mapping tool with your mapping? Or the mapping.xml file?
    Hilary Stoupa

  • 11-07-2012 10:22 AM In reply to

    Re: submit repeating and non repeating fields to sharepoint list

    I have attached a picture of my mapping. I will reply again with my tree.


  • 11-07-2012 10:22 AM In reply to

    Re: submit repeating and non repeating fields to sharepoint list

    Here is my tree as well


  • 11-07-2012 10:35 AM In reply to

    Re: submit repeating and non repeating fields to sharepoint list

    The issue with your mapping is that you are not using relative paths.

    Where you have the XPaths that start with my:myFields, you need a relative path instead.

    ../../my:NonRep/my:CityStateZip

    for example. You have to manually change those - you can't use the field picker in the task pane.

    Hilary Stoupa

  • 11-07-2012 11:03 AM In reply to

    Re: submit repeating and non repeating fields to sharepoint list

    Got it!!

     Thank you Thank you!

     One more question.. Is there a way to get this form to pop up when the user click "Add a Document"?

     Thank you again.

  • 11-07-2012 11:17 AM In reply to

    Re: submit repeating and non repeating fields to sharepoint list

    The form you are working on - with qRules in it? You can publish it to a form library. Then it will be the template for the form library and the form will open when the user clicks "Add a document" in that form library.
    Hilary Stoupa

  • 11-07-2012 11:29 AM In reply to

    Re: submit repeating and non repeating fields to sharepoint list

    Silly Question. I figured that out right after I asked about it.

    I think I am good for now. Thank you so much. You are a huge help. I'm sure i'll have another few questions in the future.

  • 06-13-2013 09:21 AM In reply to

    Re: submit repeating and non repeating fields to sharepoint list

    I have the same use case of repeating and non-repeating groups.

    I'm using Infopath 2010 and SharePoint 2013 List.

    I'm not familiar with how you are doing the paths...can I see an example of two fields to help me better understand?

    Thank you,

    Nathan

  • 06-13-2013 09:27 AM In reply to

    Re: submit repeating and non repeating fields to sharepoint list

     Sure, want to attach a screen shot of your template's schema under the options tab and tell me what you repeating group is and the name of one of the non repeating fields?

    Hilary Stoupa

  • 12-15-2016 05:08 PM In reply to

    Re: submit repeating and non repeating fields to sharepoint list

     Is there a way to achieve this solution without using QRules?

     

    Regards,

    Nate003

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