guidance on updating items on a list - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

guidance on updating items on a list

Last post 12-08-2020 07:54 AM by Hilary Stoupa. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 12-07-2020 05:39 AM

    guidance on updating items on a list

    HI! I have a Form Library Form in which I am submitting the items of the repeating table to a SharePoint List. I currently have an issue with this, the first time I submit the form all the items go to the list without an issue, however I cannot find a way to to update the same items that were submitted all the time. If i change the view only the last and new items in the repeating table get submitted. I tried to create a rule that would count the preceding tables and a "trigger" on submit to have everything get carried over by the WebService. is there a step by step guide to do this? could someone direct me to what i am missing?
  • 12-07-2020 07:58 AM In reply to

    Re: guidance on updating items on a list

    I think I would simplify the rules on the trigger. Set the trigger to 1 on submit, which you are doing. On the trigger field itself, change your rule conditions to check that the Trigger = 1, so the submit rules only fire when the trigger = 1. Remove the last rule you currently have (IncrementalCFAwardeeTrigger) and add a rule that has no conditions and simply sets the trigger field back to blank. That way it runs each time. However, in order to update items, you'll need the list item ID - and you won't get that info back from your web service submit connection. I would probably submit a unique ID for each row (maybe combine form name, plus some piece of row info, plus date time) as part of my web service submit, and then you can query for the list items prior to submitting the form data and set your list item IDs.
    Hilary Stoupa

  • 12-07-2020 08:36 AM In reply to

    Re: guidance on updating items on a list

    Hi Hilary! Thank you so much for your reply. i am passing the ID of the Form Library Item to the SharePoint List. However i am unsure as to how to tell the rule to look for those same items and update them with any new information. so far the items are being submitted over and over to the SharePoint list.
  • 12-08-2020 06:58 AM In reply to

    Re: guidance on updating items on a list

    Hi Hilary! Thank you so much for your reply. I am passing the ID of the Form Library Item to the SharePoint List. However I am unsure as to how to tell the rule to look for those same items and update them with any new information. so far the items are being submitted over and over to the SharePoint list.
  • 12-08-2020 07:54 AM In reply to

    Re: guidance on updating items on a list

     Ok - so what you need to do is get the list id for the list items (i.e. the repeating data) back in your repeating data somehow. Then in your CAML, you have to include the ID field in order to update.

    This post has a little bit of info on including the ID: https://www.infopathdev.com/forums/p/19259/103343.aspx

    I'd probably do something like have another field in my repeating section for some kind of unique id - concat the result of the now() function with the parent id and the awardee account name or something. And add a field to store the list item ID. Then add a data connection to the list you are submitting data to - don't bother querying on load. Make sure to include the list item ID field as well as your new "unique id" field. In your submit rules on the submit trigger in your repeating data, after the submit, set the query field in your new list data connection to the unique ID and run the query. That should get you back the list item ID and then you can set the ID field in the repeating data to the correct list item ID. And, of course, adjust your submit rules and your CAML so you are including that....Then the update list items method knows what to update! :)

    Hilary Stoupa

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