Submit repeating table data to SharePoint list - error - InfoPath Dev
in

InfoPath Dev

Submit repeating table data to SharePoint list - error

Last post 10-15-2013 04:32 AM by Aurelia. 8 replies.
Page 1 of 1 (9 items)
Sort Posts: Previous Next
  • 10-09-2013 12:05 AM

    Submit repeating table data to SharePoint list - error

    Hi,

     

    I am currently working on a new template to be used for submitting data to a SharePoint list.

    The template is based on a repeating table inside another repeating table (I have attached a simple example of what I need). I am trying to submit the data from the second repeating table. I am using the Qdabra InfoPath to SharePoint List Tool and it kind of works; meaning that the data is submitted as I want in the SP list, but I do get a submit error (Action: SubmitToSharePointList. Arguments: submit: ShPSubmit mapping: mapping id: my:id . Details: Object reference not set to an instance of an object.. Stack: at Qdabra.Tools.RulesLibrary.Commands.PopulateIdsAndLastModified(XPathNavigator outputNav, XmlDocument mapping, XPathNavigator mappingNav, String idXpath) at Qdabra.Tools.RulesLibrary.Commands.SubmitToSharePointList(String submitDs, String mappingDs, String id, String dsname, String xpath, String name, String uniqueName) at Qdabra.Tools.RulesLibrary.Commands.SubmitToSharePointList() at Qdabra.Tools.RulesLibrary.Commands.ExecuteCommand()).

    Can you please let me know what is causing the error?

     

    Many thanks

     

    Aurelia

  • 10-09-2013 05:43 AM In reply to

    Re: Submit repeating table data to SharePoint list - error

    Hi-

    My hunch is that the command is trying to write the ID into the my:id field, but it's finding a default value on that node and perhaps running into a conflict:

    xdXDocument:GetDOM("input")/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:ID[../d:Title = current()/../my:R_Name and ../d:month = current()/../my:month]

    I don't know why the default value would be needed; the qRules command will "inject" the list id into the my:id when the command finishes executing.

    Hope this helps!

     

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


  • 10-10-2013 12:32 AM In reply to

    Re: Submit repeating table data to SharePoint list - error

    You were right, the formula shouldn’t be needed; I removed it from the updated template.

     

    Still, when I try to submit I get same error. If you check the xml file (also attached) you can see that the qRules command injects the list id into the my:id field only for the first row of the first repeating table; the rest of the fields remain not populated. I checked this in more scenarios, and it is always only the first row of the first repeating table that gets the id.

    My guess is that the error is caused because I have a repeating table inside another repeating table. The problem is that I don’t have any idea how to solve it.

     

    Many thanks

     

    Aurelia

  • 10-10-2013 05:35 AM In reply to

    Re: Submit repeating table data to SharePoint list - error

    Instead of specifying the ID in the command, try adding it to the mapping instead. This may help resolve the issue. If it doesn't, let us know. Thanks!

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


  • 10-11-2013 01:57 AM In reply to

    Re: Submit repeating table data to SharePoint list - error

    Well…it works indeed. If I put the ID field inside the mapping and I don’t mention it in the command I do not get the error anymore.

    But, I still have a problem. I need to be able to make changes to some fields (e.g. amount) and resubmit it to SharePoint. If the ID is not in the command the rows are created again on SP list instead of updating only existing values; if I put it there I get the error.

    I have tried all possible combinations…so far the best one is the one in which I ignore the error (the data is actually submitted properly). Still, I would like to have my forms error-free J

     

    Thanks

     

    Aurelia

  • 10-11-2013 05:57 AM In reply to

    Re: Submit repeating table data to SharePoint list - error

    Using the ID in the command is the original way of using the command, and specifying it in the mapping file is the newer way of using the command. Both result in the same thing: if the ID is present, the list item is overwritten.

    Before resubmitting the data I would check whether the ID is filled in (in the form). It may be that other rules or actions are clearing the ID field.

    Hope this helps.

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


  • 10-14-2013 02:43 AM In reply to

    Re: Submit repeating table data to SharePoint list - error

    It does not seem to work. I have tried now the following:

    ·         Add the ID field in the mapping

    ·         Remove the ID field from the command

    ·         Make sure that once the data is published for the first time on the SharePoint the ID value is also populated in the infopath form

     

    Results are:

    ·         When I submit first time I don’t get any error, data is published ok

    ·         When I resubmit, new rows are created (although the ID fields values are prefilled before resubmitting)

     

    I would like to mention that I have the QRULES V3.3, which is not the latest version to my knowledge. Would this impact my results?

     

     

    Coming back to my initial idea on reason for failure (one repeating table inside another repeating table), I tried same approach on submitting data from a repeating table (simple) and it worked; if I try same thing for the repeating table from the first repeating table I get the error….

     

    Regards,

     

    Aurelia

  • 10-14-2013 05:30 AM In reply to

    Re: Submit repeating table data to SharePoint list - error

    Oh, I see. I'm sorry, I never asked which version you were using.

    Yes, the version makes a big difference. The support for mapping the ID is not in v3.3, so the ID in the command must be used.

    I'm not sure about the error concerning the repeating table within the repeating table. The mapping tool has gone thru a lot of updates since v3.3, so it's possible that something changed to support this scenario and I'm not remembering.

    Perhaps download a free trial of the latest version from Qdabra.com and try your scenario using that version?

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


  • 10-15-2013 04:32 AM In reply to

    Re: Submit repeating table data to SharePoint list - error

    Indeed, with the new version it works without any error.  Problem solved :)

    Thanks for your support

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