UpdateListItems CAML query but with Lookups - InfoPath Dev
in

InfoPath Dev

UpdateListItems CAML query but with Lookups

Last post 05-16-2013 10:48 AM by Metron4. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 05-16-2013 09:17 AM

    UpdateListItems CAML query but with Lookups

    Hi, I have been researching the idea of using an InfoPath form to update a SharePoint list. I have come across numerous posts that detail the procedure but none that address the issue of updating a table with lookup fields.

    Matt Faus seems to have answered the question in this post (his second response) but it is pretty old. Is this still true?

  • 05-16-2013 10:48 AM In reply to

    Re: UpdateListItems CAML query but with Lookups

    OK I did find a more recent post that seems to suggest it can be done, but even after reading it I'm still fuzzy on the syntax. I should also clarify that the tables originated in Access 2010 and were published to SharePoint.

    Given: Table "Projects" and Table "Project Costs"

    Projects                                         Project Costs

    ID     ProjectName                          ID    ProjectName      ProjectCost

     1     A1                                            4    A1                      $5.00

     6     E1                                          12    E1                      $5.00

     7     E2                                          13    E2                      $10.00

    If my InfoPath 2010 form is updating the ProjectCost field for project E1, how should the syntax read in my CAML query? Here is what I have:

     <?xml version="1.0" encoding="UTF-8"?>
    <Batch OnError="Continue">
        <Method ID="1" Cmd="Update">
            <Field Name="ProjectName">1;#A1</Field>
            <Field Name="ProjectCost"></Field>
        </Method>
    </Batch>

     Thanks,

     Rob

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