Codeless submitting InfoPath repeating table to a SharePoint list - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Codeless submitting InfoPath repeating table to a SharePoint list

Last post 07-16-2017 05:36 PM by Ligia1982. 103 replies.
Page 1 of 7 (104 items) 1 2 3 4 5 Next > ... Last »
Sort Posts: Previous Next
  • 07-05-2013 06:45 AM

    • amieqq
    • Not Ranked
    • Joined on 06-07-2013
    • Posts 8

    Codeless submitting InfoPath repeating table to a SharePoint list

    I'm a newbie of both InfoPath and SharePoint. But recently I have a project using InfoPath to build e-form and then publish to SharePoint. If you have work with InfoPath for a while, you'll soon find that it's difficult to promote repeating table fields to SharePoint. There's a MSDN article about how to submit InfoPath repeating table to SharePoint list.http://msdn.microsoft.com/en-us/library/office/cc162745(v=office.12).aspxBut the C# part is challenging for me, since I think it will take more than two weeks to learn that language and make the code work. I need to find the codeless way to do that C# part job. And InfoPath rules actual provide the possibility.I build a sample form just to share how I solve this problem.I create an InfoPath form using repeating table which user can add contacts. User can add as many as he wants. And when he clicks 'submit', the contacts he added will be submit to a SharePoint list.I followed the steps in that MSDS article until C# part.I build the CAML template and add CAML template to data connection, and also add the update list items web service submit connection.

    The next step is to create a loop effect in InfoPath using rules which will read the repeating table by line and set the CAML fields equal InfoPath repeating table fields, and submit this line using update list items web service.

    Here’s the form design and schema.

     

    If you cannot see the picture, please try this link to open: http://www.flickr.com/photos/28562024@N02/9213656253/in/photostream/

    As you can see from the picture, the area in blue circle is the InfoPath repeating table for using to enter contacts information. The area in green circle is to display the records in the SharePoint list which you will add new contacts to. And the area in yellow circle is built by dragging the add list item CAML connetion to, I’ll call these as CAML fields.

    And I created a ‘trigger’ field resides in the repeating table. Set  'submit ' button rule as: 

    If you cannot see the picture, please try this link to open: http://www.flickr.com/photos/28562024@N02/9213659761/in/photostream/

    Set 'trigger' field rule as:
     

    If you cannot see the picture, please try this link to open: http://www.flickr.com/photos/28562024@N02/9213658565/in/photostream/

    You might wandering how this is possible when set a target field's value:Field[@Name = "Title"]You have to go to the template's source file to change something. Hilary Stoupa had a wonderful post about this. Please follow this link to learn about this:http://www.infopathdev.com/blogs/hilary/archive/2009/06/07/hack-manifest-xsf-to-filter-the-target-of-a-rule.aspxAnd by that 'submit' and 'trigger' rule setting, your InfoPath can read the repeating table line by line and submit them to SharePoint list. This method create a perfect loop but without any limitation on 16 rules limitation since the increment rule: count(preceding-sibling::group2) + 1 is considered as a lookup, not a caculation in InfoPath.Have fun with Codeless InfoPath programming!

     

     

     

  • 07-05-2013 07:30 AM In reply to

    Re: Codeless submitting InfoPath repeating table to a SharePoint list

    Thank you so much for posting this!  Great write-up - I'll edit your post a little later to see if we can get the pics to show up, since they aren't for me. :)

    Hilary Stoupa

  • 07-05-2013 05:55 PM In reply to

    • amieqq
    • Not Ranked
    • Joined on 06-07-2013
    • Posts 8

    Re: Codeless submitting InfoPath repeating table to a SharePoint list

    Thanks Hilary for making the pictures show up! And thank you also for your great post!
  • 07-05-2013 06:05 PM In reply to

    • amieqq
    • Not Ranked
    • Joined on 06-07-2013
    • Posts 8

    Re: Codeless submitting InfoPath repeating table to a SharePoint list

    The 'trigger' field has two rules, for 'web service submit rule':

     

    For 'increment' rule:

           condition: trigger< totalline

           action: set trigger field's value= count(preceding-sibling::group2) + 1

  • 07-05-2013 06:13 PM In reply to

    • amieqq
    • Not Ranked
    • Joined on 06-07-2013
    • Posts 8

    Re: Codeless submitting InfoPath repeating table to a SharePoint list

    The picture seems cannot be displayed. So I will add the picture link of 'web service submit rule':

    http://www.flickr.com/photos/28562024@N02/9217601819/

  • 07-05-2013 06:21 PM In reply to

    Re: Codeless submitting InfoPath repeating table to a SharePoint list

    So - here is how I'm getting the correct image link from Flickr - click the little box w/ the arrow (circled in blue) and then click Grab the HTML / BBCode, circled in red. From there, I'm just using the src value. :)


    Hilary Stoupa

  • 08-22-2013 01:04 AM In reply to

    • RaYvA
    • Top 100 Contributor
    • Joined on 05-09-2013
    • Melbourne, Australia
    • Posts 86

    Re: Codeless submitting InfoPath repeating table to a SharePoint list

    Very informative!

    It took a few attempts to understand and try out, but once understood it's a very convenient way to deal with putting the repeating table items into their own sharepoint list.

     

    Thank you

  • 09-08-2013 06:33 PM In reply to

    Re: Codeless submitting InfoPath repeating table to a SharePoint list

     This is very difficult example to follow since I am not getting the entire picture.  its too fragmented.

     

    Can you provide the actual form used for this project?

  • 09-13-2013 01:01 PM In reply to

    Re: Codeless submitting InfoPath repeating table to a SharePoint list

    Can you please walk through all the steps step by step please I am struck with trigger, line, totalline fields. i was successfully able to edit manifest.xsf file. but not sure what do these above fields do., are you writing some logic to automatically get values for line, trigger, totalline fields . Thanks, SSVS
  • 09-18-2013 08:45 PM In reply to

    • RaYvA
    • Top 100 Contributor
    • Joined on 05-09-2013
    • Melbourne, Australia
    • Posts 86

    Re: Codeless submitting InfoPath repeating table to a SharePoint list

    Hi, yes the initial posts are quiet difficult to understand, so I have attached a demonstration form for those who have posted questions, hopefully this will help you in getting this working in your forms.

    This is what you will need to do to get it working:

    1. Create a Custom List in Sharepoint, keep the Title field and add an Amount field (as a number or text).
    2. Get the GUID of the Custom List.
    3. Open the attached form in Design mode.
    4. Update the default value of the List Name field with the GUID of your list from step 2.
    5. In Data / Data Connections modify the Web Service Submit data connection and replace 'workspaces2/fi' to http://WHATEVER_THE_PATH_TO_YOUR_LIST_IS/_vti_bin/lists.asmx?WSDL
    6. The form should submit all of the lines from the repeating table into your list when you click the 'Submit All Lines' button.

    Hopefully this helps.

     Once you get it working it's terrific, I have even extended it to allow for selective submit of lines based on additional criteria by modifying the condition on the TriggerLine rules!

  • 09-19-2013 08:40 AM In reply to

    Re: Codeless submitting InfoPath repeating table to a SharePoint list

    Awesome!!!!, Thank you so very much :) :)
  • 09-28-2013 09:06 AM In reply to

    Re: Codeless submitting InfoPath repeating table to a SharePoint list

    Is there mechanism that is preventing the form from submitting duplicate items? Are you getting an ID back to tie the row to?
  • 09-28-2013 06:18 PM In reply to

    Re: Codeless submitting InfoPath repeating table to a SharePoint list

    Yes, you have to get an ID back.

    Qdabra's qRules is easier to setup and maintain and there's a free trial available at qdabra DOT com under Tools.

    Patrick Halstead
    Project Manager at Qdabra
  • 09-28-2013 06:30 PM In reply to

    Re: Codeless submitting InfoPath repeating table to a SharePoint list

    I am familiar with qRules and have a license but I am interested as my current solution runs in O365 and cannot be admin-approved.
  • 09-29-2013 10:35 PM In reply to

    Re: Codeless submitting InfoPath repeating table to a SharePoint list

     It should be possible to use qRules in O365 browser forms without admin approval. Could you give that a try?

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
Page 1 of 7 (104 items) 1 2 3 4 5 Next > ... Last »
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.