Submit to SharePoint List works on newly opened form, but not on subsequent submits (form not closed) - InfoPath Dev
in

InfoPath Dev

Submit to SharePoint List works on newly opened form, but not on subsequent submits (form not closed)

Last post 03-02-2015 08:00 AM by donstephen. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 02-26-2015 05:46 PM

    Submit to SharePoint List works on newly opened form, but not on subsequent submits (form not closed)

    Hi, I have a browser form (but just testing in filler right now) that has a repeating group. I use maps to submit to 3 SharePoint lists.

    1. a full field list that has both nonrepeating, and repeating fields (including an attachment). Command: SubmitToSharePointList /submit=Sample_Request_Submit /mapping=mapping /dsname=AddAttachment
    2. submits 1 field to a next number list. Command: SubmitToSharePointList /submit=Sample_Request_Submit /mapping=mappingnextnumber
    3. a summary list and only contains fields that aren't in the repeating group. Command: SubmitToSharePointList /submit=Sample_Request_Submit /mapping=mappingsummar

    My custom submit button runs these 3 submit command lines (the form is not actually saved) in the order above (although they have no relation, so order doesn't matter). A rule after the submit, clears all the nonrepeating fields and deletes the repeating group items and inserts one back. This is in the event that the user wants to submit another request without closing the form. Everything works great except if the user submits again (form not closed), the first (full list) map doesn't write to the list. The other 2 submits are fine. If the form is closed and reopened, it works fine (all 3 submits work).

    I have tried removing the 2 submits that work (so only the full list submit is there...the one not working) and have the qrules error and success fields on the form. There is no error and the success is checked.

    Is there any other place where I can see an error, or does anyone know some trick I am missing?

    I did try another test. I removed the delete and insert for the repeating group... On the second submit, I didn't delete the existing item row (just had 1) but changed values in the fields. I got the error "Item does not exist. The page you selected contains an item that does not exist. It may have been deleted by another user.". I'm not sure what that means... (these are all new entries to a list, it's not looking up anything). I tried a third submit where I manually deleted the repeating item and added on back... got the same error. Not sure if this has anything to do with the original issue.

     Thanks for any help!

     

     

    SharePoint 2010 - InfoPath 2010 - qRules 6.1

    Filed under:
  • 02-27-2015 08:50 AM In reply to

    Re: Submit to SharePoint List works on newly opened form, but not on subsequent submits (form not closed)

    Hi Gwen,

    I am sorry to hear about the issue you have been encountering regarding the qRules SubmitToSharePointList command. I've just tested performing 2 submit to SharePoint list actions and they were working as expected - submit updates the list item/s. I'd like to clarify the scenario after disabling the two submits that work. Did the first submit work (items submitted to SharePoint list)? What happens after submitting again?

    Regards, 

    Don Stephen Lambatin / Support Engineer
    Qdabra Software
  • 02-27-2015 08:57 AM In reply to

    Re: Submit to SharePoint List works on newly opened form, but not on subsequent submits (form not closed)

    Hi Don, if I disable the submits that work (the ones with nonrepeating fields), and only have the one that doesn't (repeating and nonrepeating fields)... it still does not work. It still will only submit to the list with a freshly opened form. If I submit again (form wasn't closed), it doesn't work.

    Hope that helps :)

  • 02-27-2015 09:10 AM In reply to

    Re: Submit to SharePoint List works on newly opened form, but not on subsequent submits (form not closed)

    Thanks for the clarification. Can you verify that the second submit does not create new items at the SharePoint List? I haven't encountered this issue yet but I am guessing that there is something missing in the mapping (i.e no mapping Id - see image below)



    Regards,

    Don Stephen Lambatin / Support Engineer
    Qdabra Software
  • 02-27-2015 11:03 AM In reply to

    Re: Submit to SharePoint List works on newly opened form, but not on subsequent submits (form not closed)

    I tested some more, and found that it still doesn't work, but differently from what I was thinking. It does in fact write to the list, but it overwrites the previous entry. So, I open the form and submitted, everything worked... Then leaving the form open, submit again and it does write, but overwrites the first one.  I did this multiple times. If a subsequent submission has more line item rows, it only overwrites the original amount. So entry 1 has 1 row, but entry 2 has 3 rows... then only 1 row is overwritten (cause that's the only row there). The ID is not changing. If I close the form and reopen, then the submission works as expected, and the ID is incremented.

    I'm attaching my summary list (7 submissions were made) and detail list (only 1 submission shows, due to the overwriting)...

    In my detail map, I do have the ID field " <FormField IsRichText="false" IsId="true" IsAttachment="false" IsDate="false" IsParentId="false">../../my:ShpID</FormField>"

    This is the first time I've used the ID field on a form in the map. The reason I used it here was for the attachments (I found instructions on adding attachments and it said to create the ID field). Is there something that I need to do to force it to increment on submissions when the browser isn't closed?

    Thanks!


  • 02-27-2015 02:47 PM In reply to

    Re: Submit to SharePoint List works on newly opened form, but not on subsequent submits (form not closed)

    Thank you for all your help! I played with the form and it finally hit me to clear the ID button when they "submit again", so that the system can generate a new number (I had assumed it would automatically do it). The submits are working fine now.

  • 03-02-2015 08:00 AM In reply to

    Re: Submit to SharePoint List works on newly opened form, but not on subsequent submits (form not closed)

    I'm glad you were able to find a solution. Without clearing the ID, it was working from my end . Thanks for sharing this information.

    Regards,

    Don Stephen Lambatin / Support Engineer
    Qdabra Software
Page 1 of 1 (7 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.