updating and deleting items in sharepoint list - InfoPath Dev
in

InfoPath Dev

updating and deleting items in sharepoint list

Last post 05-08-2014 05:57 AM by rodrigosmith. 23 replies.
Page 1 of 2 (24 items) 1 2 Next >
Sort Posts: Previous Next
  • 05-15-2013 12:56 PM

    updating and deleting items in sharepoint list

    I've been using the "InfoPath to SharePoint List Tool" to add items from a repeating group in InfoPath to a SharePoint list. Very happy with the results!

    After initially submitting the InfoPath form, if I open it again and change some data and then re-submit, new rows are added to the SharePoint list, but the old rows are still there. Can I fix this by using the ID parameter in the command? If so, how to I set up an autonumber field in InfoPath?

    Also, I would like to delete the fows from the SharePoint list if I delete the InfoPath form. Would I have to code this using an event handler, or is there a nice Qdabra way to do it?

  • 05-15-2013 02:04 PM In reply to

    Re: updating and deleting items in sharepoint list

     Hi - I'm glad you like qRules!

    So - you'll need to modify your mapping to indicate a form field you'd like to use an ID (I'm assuming you are using 4.2 or 4.3? If you are using an earlier version, holler.)

    If you have a field indicated as an ID in your mapping, you won't actually have to use the /id parameter.

    And - you won't have to do anything else - qRules will:

    1. Submit your other data to the list
    2. Get the SharePoint List Item ID back from the list
    3. Populate your ID field with the result

    This will allow you to update existing items rather than always creating new.

    You can also handle for deletes by implementing the RefreshSharePointListItems command.

    Here are some blog posts that may help:

    http://www.infopathdev.com/blogs/hilary/archive/2012/05/30/qrules-submittosharepointlist-walkthrough-for-v4-2.aspx
    http://www.infopathdev.com/blogs/hilary/archive/2012/07/05/qrules-refreshsharepointlistitems-walkthrough-for-v4-2.aspx

    Let me know if you are using an earlier version, okay?

    Hilary Stoupa

  • 05-16-2013 09:01 AM In reply to

    Re: updating and deleting items in sharepoint list

    Thanks for the reply. I'm using version 4.3.

    Following the instructions in the first blog post, I updated my mapping file to use an ID. The ID (named RepeatingRowId) is a text field in the repeating section of my InfoPath form. I saved the mapping file, updated the mapping data connection in my InfoPath form, then published and uploaded my InfoPath form. But when I submit the form and then re-open it, RepeatingRowId is blank. If I edit data and submit again, new rows are added to the list and the old rows are not updated. Where did I go wrong?

  • 05-16-2013 09:27 AM In reply to

    Re: updating and deleting items in sharepoint list

     May I see your form, please? If you email via the forum, I'll reply and you can send it to me - or you can attach it under the options tab.

    Hilary Stoupa

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

    Re: updating and deleting items in sharepoint list

     Thanks for emailing your form. Your submit rules are in the wrong order - you are submitting to the library prior to submitting to the list. So - your XML is saved to the library. Then qRules populates the ID field.... but that doesn't get saved. :)

    Hilary Stoupa

  • 05-16-2013 11:18 AM In reply to

    Re: updating and deleting items in sharepoint list

    That worked! Thanks so much. Now to attack the RefreshSharePointListItems command. :)
  • 05-20-2013 11:12 AM In reply to

    Re: updating and deleting items in sharepoint list

    Hi Hilary,

    I'm running into an issue implementing RefreshSharePointListItems. I'm working through the tutorial that you linked. Everything goes OK until I try to preview the saved XML file. The form data looks correct, but there is nothing in the Result box. Do you have any suggestions?

    Thanks.

  • 05-20-2013 11:35 AM In reply to

    Re: updating and deleting items in sharepoint list

     Can I see your form? You can attach it under the Options tab...

    Hilary Stoupa

  • 05-20-2013 12:13 PM In reply to

    Re: updating and deleting items in sharepoint list

    Hi - everything in the template you emailed looks right - can you add the QdabraRules error node to the form and try executing the command again? See if you get an error message?

    Hilary Stoupa

  • 05-20-2013 12:49 PM In reply to

    Re: updating and deleting items in sharepoint list

    Hmm, the error node is blank also. I've attached a screenshot of all of the QdabraRules nodes.
  • 05-20-2013 12:53 PM In reply to

    Re: updating and deleting items in sharepoint list

    Can you email the XML you are previewing with?

    Hilary Stoupa

  • 05-20-2013 02:48 PM In reply to

    Re: updating and deleting items in sharepoint list

     Change the condition on finishedLoading to finishedLoading = true instead of TRUE.

    Hilary Stoupa

  • 05-21-2013 06:33 AM In reply to

    Re: updating and deleting items in sharepoint list

    Changed TRUE to true. Success now says "false" and Error says "Failed to refresh list items: No list items to refresh. Verify parameters are correct."
  • 05-21-2013 07:24 AM In reply to

    Re: updating and deleting items in sharepoint list

     Perfect. So have you modified any of the items in the list after creating them? The XML sample has the last modified date/time and will compare it to the last modified date/time in the list to see what needs to be refreshed.

    Hilary Stoupa

  • 05-21-2013 08:44 AM In reply to

    Re: updating and deleting items in sharepoint list

    Sorry if this is a silly question, but I have a deadline I'm trying to meet and I need to make sure I'm going in the right direction. It looks like RefreshSharePointListItems will delete individual items from a SharePoint list. But what if the entire InfoPath form is deleted? Will all of the corresponding items in the SharePoint list be deleted? Thanks.
Page 1 of 2 (24 items) 1 2 Next >
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.