Updating a SharePoint list item from form - InfoPath Dev
in

InfoPath Dev

Updating a SharePoint list item from form

Last post 10-14-2011 01:33 AM by Mingle. 24 replies.
Page 2 of 2 (25 items) < Previous 1 2
Sort Posts: Previous Next
  • 07-24-2006 07:07 AM In reply to

    Re: Updating a SharePoint list item from form

    Actually scratch that. I accidentally deleted a number too. So, as I thought I had seen before, the brackets are optional. However if the GUID is not correct you get the error you are seeing. Need to double check that the GUID you see when you modify settings is the one you have listed in your field.
  • 07-24-2006 07:14 AM In reply to

    Re: Updating a SharePoint list item from form

    Hey Clay, thanks for the additional info. I did try adding the brackets first as your first post this morning suggested and got the same error. I went back into the site list and verified I have the correct guid. Not sure what else could be causing this error but it is very frustrating at this point.
  • 07-24-2006 01:59 PM In reply to

    Re: Updating a SharePoint list item from form

    You might want to try another list even a sample.
    The issue is that the GUID is not being resolved properly. So if you are sure the GUID is right then it probably is that you are refering to the wrong site.
    One thing I thought of is the data connection you are submiting with.. You need to navigate to the lists.asmx for the specific subsite where your list is located. The top level site will not work. I am using a team site list so I have to go to thehttp://server/teamsites/XX/_vti_bin/lists.asmx?WSDL
    I am wondering if you are not drilling down to the right web service.

    Just a thought otherwise it is probably one of those start over and create a working sample and go from there.
  • 07-25-2006 06:53 AM In reply to

    Re: Updating a SharePoint list item from form

    Ok Clay...getting closer, I think.
    I was using the lists service from the main site...not the subsite. I changed that in the data connect and now when I try to submit the ticket number to the sharepoint list I no longer get any error messages....however, when I go into the sharepoint to view the list it has not been updated!! Very weird. Not sure what to try next.
  • 07-25-2006 07:17 AM In reply to

    Re: Updating a SharePoint list item from form

    Ok, I have sifted through the setup doc again to be sure I have all my data connections set correctlty and discovered the issue.

    I am actually setting up a rule in a button as follows..

    If the TicketNumber field is blank,
    use the dataconnect to the TicketNum list to pull the ticket number in and add 1 to it. I then call the submit to the update web service.

    problem is I am not specifying what to submit. So the service is finding the list ok but I am not sure how to tell it to submit my ticket number field to the list.

    ???
  • 07-26-2006 07:49 AM In reply to

    Re: Updating a SharePoint list item from form

    The first thing I would do is follow the example and put the actual fields from your caml template on your form. Update a value and submit / refresh and verify you are able to update the SharePoint list. I think you should no longer have any problem.

    As far as programatically setting the value that is a bit more challenging. I have not figured out yet how to set specific fields of the list. To have the user type in a new record or change an existing manually works but i would like to be able to set field values and submit. however since the SP list fields names are attributes and it is a repeating field i have not gotten this to work. I am not sure how you can specify a specific repeating field to update since their is no filter option on the update field only on the value field. My guess is it will probably require code but if someone has an answer that would be great.
  • 07-27-2006 06:34 AM In reply to

    Re: Updating a SharePoint list item from form

    Clay..appreciate you sticking with me on this...cant beleive how frustrated i am getting here.

    Anyway, I followed the example by simply creating a new form and a list on my sharepoint site. Once I set up the example the update worked flaulessly.
    So now I went back to my form and thing I know where the problem is ..
    The problem is that in the example it sets up the button with an action of Submit. And then the submit options are filled in. In my form the button has to have the action set to Rules and Custom Code due to a number of rules I need to run before I submit the form to the Sp library. So apparently I cant submit the ticket number field to the lists web service AND submit the form to the library in the same button and that is what I would need to do.
    So now I am digging for Cuctom code I cant try to add to my form.
  • 07-27-2006 02:51 PM In reply to

    Re: Updating a SharePoint list item from form

    Yah I spoke with Greg about this and got the solution.

    Unfortunately Infopath does not have a filter for the field entry when setting a Fields Value via a rule. So with a repeating field like the CAML it sets all of them instead of letting you specify each field. So what you have to do it set the field like you would but then extract the form and manually edit the .xsl file for each action to add the filter. Add [Name="ID"] etc to specify each field with the value you need. Then once all of your values are seeded you can submit. So unfortunately it takes some manual work to set it up and hopefully you don't have to change the CAML or your form part very often.
  • 08-07-2006 06:55 AM In reply to

    Re: Updating a SharePoint list item from form

    Hi Clay..thanks but I am not sure exactly what you mean here. My CAML file is :
    <?xml version="1.0" encoding="UTF-8" ?>
    <Batch OnError="Continue">
    <Method ID="1" Cmd="Update">
    <Field Name="Number" />
    </Method>
    </Batch>

    So when you say I need to add Name="ID" do you mean I have to add a field for each of the column in my table? The custom table I set up only has 1 column called 'tcktNum'. There is an ID and Type column is see in the main view but those were default columns in the custom list.
  • 10-14-2011 01:33 AM In reply to

    • Mingle
    • Not Ranked
    • Joined on 10-13-2010
    • Posts 3

    Re: Updating a SharePoint list item from form

    I want to delete a piece of SharePoint list item and use the CAML template,but I got the error'
    the rule can't be run,the parameter is invalid '
Page 2 of 2 (25 items) < Previous 1 2
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.