Updating One Field In SharePoint List - InfoPath Dev

InfoPath Dev

Use our Google Custom Search for best site search results.

Updating One Field In SharePoint List

Last post 02-11-2014 10:03 PM by RaYvA. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 01-28-2014 10:08 AM

    Updating One Field In SharePoint List


    I am trying to build a form in IP 2010 that, upon loading, shows one field (policy number) from the first record of a sharepoint list, organized by another field called status.  This will then be used to populate information in the form, as it is a unique identifier.  I have been able to do this with form load rules and the position()=1 expression on my data connection the the SharePoint list.  But then, I want the form to (either on load automatically, or when the user clicks a button) to change the status associated with the Policy number that was shown and Submit back to the SharePoint List. This will ensure that when another form is created, the next item in the list will appear, since that status changed it sorted down to the bottom of the list.

    http://blog-sharepoint.blogspot.com/2009/07/summary-how-to-programmatically-update.html#process-6 - This post got me through setting up the CAML and web submit, but I was testing it, and editing the status in the repeating field then submiting does not give me an error, but does not update the list and when I query again to check it resets to the default.

    http://www.infopathdev.com/blogs/hilary/archive/2009/06/07/hack-manifest-xsf-to-filter-the-target-of-a-rule.aspx - In theory this does what I want to, instead of only updating ItemType of Labor, it would only update the item that corresponds to the policy number that was populated when the form opened.  Unfortunuatly, following the steps in this document does not seem to work for me, while manifest.xsf is saving the changes I made, it is not updating the Xpath in the action.

    Unfortunately, I cannot use C# coding as of right now due to corporate restrictions (though I am exploring that option), and for the same reason qrules is not an option - this may not even be possible with these restrictions.

    I have attached what I am working off of, any help would be appreciated!



  • 02-11-2014 10:03 PM In reply to

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

    Re: Updating One Field In SharePoint List

    Hi Kathryn,

    Great question!  Looks like you are well on the way to getting this to work! :) Your nearly there.  What you missed from the first post was the way to create the update payload before you submit it to the web service, and Hilary's post does give you most of the answer.

    If you had read this post on MSDN Submitting Data from InfoPath 2007 to a SharePoint List you would have gotten there.

    You need to populate the CAML payload prior to submitting it. You do this my adding a coule of 'Set a fields value' rules prior to the web services submit..... but then you need to modify the XSF so that you populate the correct fields with whatever data you want.  I have attahced an updated form which I have done this.  The rules in the XSF would then look like this:

       <xsf:rule caption="submit" isEnabled="yes">
        <xsf:assignmentAction targetField="xdXDocument:GetDOM(&quot;Update List Item Template&quot;)/Batch/Method/Field[@Name='Pol_Num']" expression="my:Pol_Num"></xsf:assignmentAction>
        <xsf:assignmentAction targetField="xdXDocument:GetDOM(&quot;Update List Item Template&quot;)/Batch/Method/Field[@Name='Status']" expression="my:Status"></xsf:assignmentAction>
        <xsf:submitAction adapter="Web Service Submit"></xsf:submitAction>

    As you can see the filter is quiet different to that in Hilary's post.

    I have also noticed in your list schema's that you have a Title field, which will also need to be populated in the same fashion, in order for the web services call to find the item that you want to updated (the key), you may also be able to pass in the ID of the item to do this (I think off the top of my head anyway).

    Hope this helps?


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