Infopath form repeating table updating sharepoint list - without code? - InfoPath Dev
in

InfoPath Dev

Infopath form repeating table updating sharepoint list - without code?

Last post 01-02-2014 07:37 AM by BillF. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 12-31-2013 09:59 AM

    • BillF
    • Not Ranked
    • Joined on 12-31-2013
    • Posts 2

    Infopath form repeating table updating sharepoint list - without code?

    Hi all,

    I'm trying to avoid having code attached to my library's form template but need to update multiple rows in a list from a repeating table in the form. A single row isn't a problem. I created the CAML xml data source, populated it with rules when the data changes, and can submit all without code but only a single row. I don't see any obvious rule method that would add a new node/update method to the xml batch as opposed to simply overwriting the same one every time. So, right now I just get one update from my repeating row and that's obviously from the last one I updated.

    So, a simple CAML looks like so:

    <?xml version="1.0" encoding="UTF-8" ?>
    <Batch OnError="Continue">
        <Method ID="1" Cmd="Update">
            <Field Name="Client"></Field>
            <Field Name="ID"></Field>
        </Method>
        <Method ID="2" Cmd="Update">
            <Field Name="Client"></Field>
            <Field Name="ID"></Field>
        </Method>
    </Batch>

    There will be more fields but this is sufficient to test with. 

     What actually gets sent to the server looks like this:

      <Batch OnError="Continue">
        <Method ID="1" Cmd="Update">
            <Field Name="Client">1234</Field>
            <Field Name="ID">10</Field>
        </Method>
        <Method ID="2" Cmd="Update">
            <Field Name="Client">1234</Field>
            <Field Name="ID">10</Field>
        </Method>
    </Batch>

    So, updating the field updates all of the fields for all methods. 

    The rule's update, after being exported and edited, like so:

    Field[@Name = "ID"] 

    or technically like so:

    <xsf:assignmentAction targetField="xdXDocument:GetDOM(&quot;UpdateInventoryCaml&quot;)/Batch/Method/Field[@Name = &quot;ID&quot;]" expression="."></xsf:assignmentAction> 

     Has anyone heard of doing this without writing code to add a new node and populate it before submitting?

    SharePoint 2013 and Office/InfoPath 2013 are being used. 

  • 01-02-2014 07:37 AM In reply to

    • BillF
    • Not Ranked
    • Joined on 12-31-2013
    • Posts 2

    Re: Infopath form repeating table updating sharepoint list - without code?

    You can update specific nodes by specifying the method ID but I don't see any obvious way to do it other than a constant so I guess I should just give in and write the code. 

     Method[@ID = "1"]/Field[@Name = "ID"]

    Still, I would be interested to see if there is a way to do this without writing c# code and sandboxing the form, adding a digital signature, admin approval, etc. This is especially true if I want to allow a non developer to work on the form later.

    Yes, I know about Qdabra :-) I've suggested the perpetual enterprise developer version since it seems to address the most obvious shortcomings of InfoPath and would allow non-developers to do more of the form work. 

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