problems submitting items to a sharepoint list - InfoPath Dev

InfoPath Dev

Use our Google Custom Search for best site search results.

problems submitting items to a sharepoint list

Last post 01-31-2011 08:46 AM by Hilary Stoupa. 11 replies.
Page 1 of 1 (12 items)
Sort Posts: Previous Next
  • 01-27-2011 09:57 AM

    problems submitting items to a sharepoint list

    I ran through the tutorial here:

    One thing i noticed....
    when setting up the submissions section i do not have
    tns:listName and tns:updates
    Instead I have ns2:listname and ns2:updates
    So when I try to select the listName I have  ":ListCollection" instead of "ListCollection" which results in:

    as opposed to

    Maybe this is the problem as when I try to submit my for I get this message in the error node:
    Failed to select node for SharePoint List Id

    If you have any ideas its greatly appreciated, thanks!




  • 01-27-2011 10:03 AM In reply to

    Re: problems submitting items to a sharpoint list

    Actually -- the :ListCollection was a change that was made for SharePoint 2010 compatibility. Using the UpdateListItems method in 2010 was failing if the listName field had a namespace (we don't want to talk about the amount of effort I had to expend to discover that).

    Your error, on the other hand, indicates there is a problem with the field you passed in for the /id parameter for the command. Can you paste your command syntax in a reply?

    Hilary Stoupa

  • 01-27-2011 10:12 AM In reply to

    Re: problems submitting items to a sharpoint list

    Hilary you're awesome for being so fast :D
    So ok, here is the line I started with.

    SubmitToSharePointList /submit=ShPListSubmit /mapping=mapping /id=my:id

    When I go into my 'mapping' datasource, within 'batch' id is in caps so I tried it with this too:

    SubmitToSharePointList /submit=ShPListSubmit /mapping=mapping /id=my:ID 

    In both cases I still get the same error message.

  • 01-27-2011 10:57 AM In reply to

    Re: problems submitting items to a sharpoint list

    Here's the thing -- the /id parameter? It is supposed to have a value that is a field in your form. Do you have a field called my:id? Is the data you've mapped repeating? If it is repeating, you want the relative path to just the field where you would like qRules to return the SharePoint List Item Id (necessary if you'd like to update your list items from your form). If it is NOT repeating, use the full XPath to your field. If you don't want to be able to update from your filled out form, just leave out the /id parameter entirely. And if this is confusing, feel free to attach your template in a reply (under the options tab) and I'd be happy to help you out.

    Hilary Stoupa

  • 01-27-2011 01:08 PM In reply to

    Re: problems submitting items to a sharpoint list

     Ok I see what you're saying and I tried it out (or at least what i im thinking i should be doing) but still having the problem so I've attached the form as you've instructed.  Thanks!

  • 01-27-2011 02:25 PM In reply to

    Re: problems submitting items to a sharpoint list

    It looked to me from your mapping that you were mapping your fields from the repeating item group, is that correct? In that case, if you want to use the /id parameter in the Submit to SharePoint List command, you'd want to have a field inside that same repeating group (you don't have to show it on your form) that can hold the item id from SharePoint. And you'd want to use a relative path -- the XPath from the repeating group.

    I added a field to your item group called "id". I modified your command so /id=my:id. Give it a try now. Right click the link in the heading to this post and save the file locally -- then right click the saved file and select Design to open the template in design view. At that point you can preview.

    Hilary Stoupa

  • 01-28-2011 06:15 AM In reply to

    Re: problems submitting items to a sharpoint list

     ahhhh ok I see I do need to add the id field then it works correctly.   thanks so much for your help, I now understand it instead of just doing it! 

    But thing thing that is still foggy is the bit about a non-repeating item group....How do I call out the id for this?  the xpath from the group they are all contained in?  That makes sense to me logically but maybe I have done something wrong again.  If you have time and would like you can look at the attached form (i know you cant really try this out) and see what I have in the rules field for doesn't seem to be working and I'm not sure why.  But overall this form is what I have been tinkering with for the past week as I delve into infopath.  Thanks for your time again!

  • 01-28-2011 06:32 AM In reply to

    Re: problems submitting items to a sharpoint list

     Seems to only like one attachment, here is the xsn

  • 01-28-2011 08:04 AM In reply to

    Re: problems submitting items to a sharpoint list

    If you have a non-repeating mapping, you still need to identify what field in your form (non-repeating) you want to use for the SharePoint List Item Id.

    In your current sample form, I don't see a field in the data source that makes sense for this, so I'd add a new field. Then use the full XPath to the field.

    I've done this to your sample and am attaching it.

    For some reason, you keep seeming to want to use a group (a folder icon in the main data source task pane) for the id -- but we need an actual field. If you don't have a field already to use for this purpose, you can create one. Again, it doesn't have to show on the form.

    The purpose of the ID field is so that if you re-open the saved, filled out XML, and you modify the item that has already been submitted to your SharePoint List, and you re-submit, instead of having a new item created, the original item is updated. This may or may not be what you want to have happen, but like most qRules commands, SubmitToSharePointList has been engineered to try to provide the form designer with as much flexibility as possible. The intent of qRules is to give you a collection of tools that you can use in tandem to replace the need for custom code in your forms.

    Hilary Stoupa

  • 01-31-2011 06:07 AM In reply to

    Re: problems submitting items to a sharpoint list

    Thanks for you response Hilary, it was helpful as usual.  I understand the need for a unique ID field and even tried this right away when working on the problem.  I really wasn't sure the logic behind it but now I do so that is great.  This gets me back to my error of:

    Failed to submit to SharePoint. URL = ''
    (the xxx fields are just placeholders for my real setup)

    For this I am not sure the exact cause of the error.  Is it that I cannot submit to the list based on its location?  I cannot submit due to passing something wrong to _vti_bin/lists.asmx?  or that there is something wrong with submittosharepoint?


     edit:  perhaps I'm only supposed to give the top level:
    instead of drilling down to the where the list is:
    It does not make sense that this would be the problem but I will try it.  other than that i am thinking it must be something wrong with my submit to list data connection.

  • 01-31-2011 06:14 AM In reply to

    Re: problems submitting items to a sharpoint list

    I got it!  There was a simply mistake I made in the data connection to submit as a result of repeated attempts. 
    I am so happy that it works, thanks so much for your help hilary!

  • 01-31-2011 08:46 AM In reply to

    Re: problems submitting items to a sharpoint list

    Fantastic, glad you got things working.

    Trust me, this gets easier with practice -- next time you set up this command you'll be surprised it was such a struggle. :- }

    Hilary Stoupa

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