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 4 of 7 (104 items) « First ... < Previous 2 3 4 5 6 Next > ... Last »
Sort Posts: Previous Next
  • 03-12-2014 09:46 AM In reply to

    Re: Codeless submitting InfoPath repeating table to a SharePoint list

    Hey RaYvA! I bet you that this feels like the thread that never ends, huh, haha?!

    First-off, the revised attachment in this post is wonderful! I am trying to use the logic from this trick on a larger project that I am working on and am having a hard time figuring it out. Let me explain what I think happens and maybe you can tell me where I am turned around, haha!

    So after filling out the form, I click submit:
    - The TriggerSubmit rule on the button sets SubmitTrigger value to 1
    - Then, the SubmitLine rule on the SubmitTrigger field checks to see if SubmitTrigger is equal to TableLine AND if SubmittedID is blank
    - If both of these are true, then the rule sets the Title field on the sharepoint list to the Title field on the form, and does the same for the Amount field.
    - Finally this rule pushes all of those changes to the SharePoint server to actually update the SharePoint list

    (this is where I get fuzzy)
    - After it does this, the SetSubmittedRecordID rule on the SubmitTrigger field checks to see if SubmitTrigger is equal to TableLine AND if SubmittedID is blank
    - If both of these are true, then the rule sets the ID field on the Repeating Table Submit Test List data connection to blank, queries that data connection, then sets the SubmittedID form field to equal the max of the ID field from the Repeating Table Submit Test List.
    (while I understand the rules involved with this step, I am not sure what EXACTLY the purpose of the above part is. Could you elaborate?)

    - Lastly, the IncementSubmitTrigger rule on the SubmitTrigger field checks to see if SubmitTrigger
    - If it is then the rule steps up the incremental count of the SubmitTrigger field by one
    (I assume this part is the loop/repeat feature that checks and posts each of the entries for the repeating table and only stops when it reaches the last record)

    That being said, please feel free to correct or elaborate on any of the things I just mentioned. If that seems correct, that means I only have two questions:
    - Why is the SetSubmittedRecordID rule needed?
    - If the SubmitLine rule checks to see if blank and it actually isn't blank (say in the case of updating the amount of one of the entries), do any of the rules know how to handle that?

    Thanks for all of your help and I look forward to hearing from you!
  • 03-14-2014 01:00 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 maciasd3,

    There are two loops happening (because someone mentioned that the return of the ID was important - I dont think it is but there you go)

    The forward loop pushes (saves A) the item to the list...

    The reverse loop looks for the ID of outer loop (A)

    Reverses 1 item if required

    Updates record if found (A)

    Finish looking for ID

    Finish looking for A

    So (1) SetSubmittedRecordID is only valid if you want to know the ID of the record and its children, if you don't want to/care for that that then it's irrelevant

     And (2) I don't know, lol, I'll have to test that :P

  • 03-19-2014 10:58 AM In reply to

    Re: Codeless submitting InfoPath repeating table to a SharePoint list

    Hey RaYvA, thanks for that explanation. This makes much more sense now.

    Sadly, I am simply missing one key factor that is preventing me from implementing this. After downloading your copy and changing the data connections to my server, I am able to sucessfully submit the repeating table to a custom list. However, if I change the name of the "Title" and "Amount" fields to "STRefID" and "TaskName," respectively, it stops working. I was meticulous to change EVERYTHING that references those two fields as well (the CAML file, the columns on the server side, the "[@Name]" filters in the manifest.xsn file, any and all rules that once referenced "Title" and "Amount," etc. The funny part is that the rules are running and the SubmitTrigger field is being updated properly. What isn't working properly is the actual submission to the SP list and the SubmittedID is not updating and is remaining blank.

    I have to be missing something that allows the form to communicate with the SP list thus is the reason that the table lines are not pushing to the list and the reason that the IDs are not feeding back into the SubmittedID field.

    I am pulling my hair out with this one and would love any help you could give. Thanks!
  • 04-04-2014 03:55 PM In reply to

    Re: Codeless submitting InfoPath repeating table to a SharePoint list

    I've got this form working OK, but am having problems with one particular field. I have a field called Efficiency that is populated by a rule based on two other fields, Machine Number and RPM. Once RPM is filled out, the rule divides RPM by a number (which is different based on the Machine Number) and fills in Efficiency with this number.

    When the form is submitted, Efficiency doesn't get populated in my SharePoint list. I've gone through all of the steps of adding it in the XML file data connection and also updating the xsn source file.

    Any suggestions anyone has would be greatly appreciated!

  • 09-08-2014 03:05 PM In reply to

    Re: Codeless submitting InfoPath repeating table to a SharePoint list

    First, just want to say thanks to everyone on these forums - you are lifesavers! Couple things, I was wondering if it was possible for someone to write a short article on how to do this step-by-step since it seems it is a bit hard to follow. The example forms are invaluable but they do not teach you how to do this from an existing form. Secondly, I am having an issue getting this to work on my live SP2010 server but it works perfectly on my SP2010 Dev server. I can take the templates and modify the data connections and it populates the list as expected on the dev server. However, when I do the same thing on my live server I get this access error: An error occurred while trying to connect to a Web service. An entry has been added to the Windows event log of the server Log ID: 5567 Upon looking up the error it shows: DataAdapterException Message: The remote server returned an error: (401) Unauthorized Misc. Notes: The live server uses SSL, but I am getting the same error on our SP2013 Dev server without SSL. I have tried switching from Kerberos and NTML but it does not seem to make a difference. Any help would be greatly appreciated. Thank you
  • 09-16-2014 02:35 AM In reply to

    Re: Codeless submitting InfoPath repeating table to a SharePoint list

    Hi, Thank you for this very helpful solution. I also have the same problem. No problem to get the sample to run, but as soon as i add an additional column (eg. Address in the contact sample) then is is not working anymore. Is there kind of a limit how many rows can be exported? I have the same problem as maciasd3. The counting of the rows is working, but nothing sumbited to the SP list. If I remove this additional column the its working again. I would be very thankful if someone can help me on this.
  • 09-17-2014 11:58 PM In reply to

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

    Re: Codeless submitting InfoPath repeating table to a SharePoint list

     Did you add the addtion column to the CAML code? To make sure it submits the addtional column, you need to add it to the CAML code.

  • 09-18-2014 07:13 AM In reply to

    Re: Codeless submitting InfoPath repeating table to a SharePoint list

    Yes I did add it to the CAML code as well. You can see it in the attached file. If I remove the additional added column address then the sample is working without any problems. If I add it then it stops submitting to the SharePoint List. (In the attached file I changed the Site URL to a generic one.)
  • 09-18-2014 07:23 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

    Hitch:

     Hi RaYva,

    Thanks you very much for the post and I followed your attachment and was able to add items to list successfully. I have another question, is it possible to edit those already submitted items from InfoPath form' repeating table?

     

    Thanks!!

     

    Yes it is, I now have a number of forms that do this.  I'm not sure if it is worth extending this post or creating another to demonstrate this? Thoughts?

     

  • 09-18-2014 08:12 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

    officeninja:
    First, just want to say thanks to everyone on these forums - you are lifesavers! Couple things, I was wondering if it was possible for someone to write a short article on how to do this step-by-step since it seems it is a bit hard to follow. The example forms are invaluable but they do not teach you how to do this from an existing form. Secondly, I am having an issue getting this to work on my live SP2010 server but it works perfectly on my SP2010 Dev server. I can take the templates and modify the data connections and it populates the list as expected on the dev server. However, when I do the same thing on my live server I get this access error: An error occurred while trying to connect to a Web service. An entry has been added to the Windows event log of the server Log ID: 5567 Upon looking up the error it shows: DataAdapterException Message: The remote server returned an error: (401) Unauthorized Misc. Notes: The live server uses SSL, but I am getting the same error on our SP2013 Dev server without SSL. I have tried switching from Kerberos and NTML but it does not seem to make a difference. Any help would be greatly appreciated. Thank you

    I haven't yet needed to do any InfoPath over SSL (fortunately) as all my forms are via 2FA VPN, maybe do you have https in the web calls?

  • 09-18-2014 08:19 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

    maciasd3:
    Hey RaYvA, thanks for that explanation. This makes much more sense now.

    Sadly, I am simply missing one key factor that is preventing me from implementing this. After downloading your copy and changing the data connections to my server, I am able to sucessfully submit the repeating table to a custom list. However, if I change the name of the "Title" and "Amount" fields to "STRefID" and "TaskName," respectively, it stops working. I was meticulous to change EVERYTHING that references those two fields as well (the CAML file, the columns on the server side, the "[@Name]" filters in the manifest.xsn file, any and all rules that once referenced "Title" and "Amount," etc. The funny part is that the rules are running and the SubmitTrigger field is being updated properly. What isn't working properly is the actual submission to the SP list and the SubmittedID is not updating and is remaining blank.

    I have to be missing something that allows the form to communicate with the SP list thus is the reason that the table lines are not pushing to the list and the reason that the IDs are not feeding back into the SubmittedID field.

    I am pulling my hair out with this one and would love any help you could give. Thanks!
     

    Did you "change" the name of Title? That's a big NO-NO in SharePoint terms......If you wanted a List that didn't have a Title field then create it in SharePoint Designer, delete the Title field (if it was defined) prior to saving and replace it with another field that is mandatory.  SharePoint will keep internal field names when you rename them and then the web services calls wont work.

    Or keep the Title field and give it the same data as your "STRefID" and "TaskName," fields then everything should work

  • 09-18-2014 08:44 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

    breiti78:
    Yes I did add it to the CAML code as well. You can see it in the attached file. If I remove the additional added column address then the sample is working without any problems. If I add it then it stops submitting to the SharePoint List. (In the attached file I changed the Site URL to a generic one.)
     

    This form doesn't look anything like the sample provided (it has a lot more XSF tags in there and I'm not in a position to investigate what they are going to do), but I can see where you're going, um, I can only suggest getting the sample working and then adding a single field to the list then to the CAM one at a time until you  get all the fields that you want..... Then start another form, because you will have a great base to copy from.

    Note my previous post, that if you change field names in SharePoint after they have been created then the internal field name remain the same and can cause issues

  • 09-18-2014 08:45 AM In reply to

    Re: Codeless submitting InfoPath repeating table to a SharePoint list

    Yes, please! I am trying to use your methodology to renumber steps - so if you have a Batch updatelistitem form that manages to loop through past the 16 mark, that would be amazing!!!
  • 09-18-2014 08:49 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

    bwhite05:
    Yes, please! I am trying to use your methodology to renumber steps - so if you have a Batch updatelistitem form that manages to loop through past the 16 mark, that would be amazing!!!
     

    Hi bwithe05 the last sample overcomes the 16 rule depth issue,not sure what post that is, but if you work backwards you'll find a post that states this.

  • 09-18-2014 08:54 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

    Everyone has to remember that in addition to adding fields your List, you have to add these to your target XLM definition and then you need to use Hilarys methodology to filter the population of the target XML data prior to submitting using the web connection!  Here's the link again to Hilary's outstanding post http://www.infopathdev.com/blogs/hilary/archive/2009/06/07/hack-manifest-xsf-to-filter-the-target-of-a-rule.aspx may help - it describes manually modifying the manifest file of the template to add XPath filters to the target for a rule.

Page 4 of 7 (104 items) « First ... < Previous 2 3 4 5 6 Next > ... Last »
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.