in

InfoPath Dev

Add Sharepoint List Items with InfoPath

Last post 11-20-2008 01:05 PM by BuildPro Guru. 118 replies.
Page 8 of 8 (119 items) « First ... < Previous 4 5 6 7 8
Sort Posts: Previous Next
  • 10-05-2007 11:06 AM In reply to

    Re: Add Sharepoint List Items with InfoPath

     Never mind, i didn't read the tutorial properly :). Thanks!

  • 10-05-2007 01:52 PM In reply to

    Re: Add Sharepoint List Items with InfoPath

    Hi Matt,

     I followed your tutorial (it worked) and then tried to replicate this on another list (imported to sharepoint from excel). I modified the xml document so that the fields matched the name of the fields in SharePoint. However, the site does not seem to get updated (even though the form tells me that it successfully uploaded the information). Is there something else that needs to be modified?

    I used the same SharePoint site for my application and for the example in your tutorial.
     

  • 10-09-2007 01:39 PM In reply to

    Re: Add Sharepoint List Items with InfoPath

    One thing to note when you publish to sharepoint from excel is your first column will always be title even though you published it as something different. Go to edit your first column and you'll see what I mean.

    Shaun Nieves
    Sharepoint Manager
  • 10-10-2007 06:30 AM In reply to

    Re: Add Sharepoint List Items with InfoPath

     Hi Shaun,

     Not sure I understand what you mean by first column will always be title. When I tried to edit my first entry, the first column I can update is the year column. Are you referring to the attachment column that I see when I look at my list?
     

  • 10-10-2007 08:31 AM In reply to

    Re: Add Sharepoint List Items with InfoPath

    "year" column being the first column in my imported list 

  • 10-11-2007 10:19 AM In reply to

    Re: Add Sharepoint List Items with InfoPath

    Check your pm. Let me know if you have any other questions...

    Cheers!

    Shaun Nieves
    Sharepoint Manager
  • 11-12-2007 10:35 AM In reply to

    Re: Add Sharepoint List Items with InfoPath

    I've been following the post and created the connection just fine, but it came to my attention that the webservice doesn't respect the required fields.

    Is it possible, without using any programming, to force a field in the caml to be required, and make that show up in the form?

    I can do it using programming, I create fields for the parameters and force them to be riquired, the, using the on_change event i "copy" them to the xml data source field. But is there a way to this without programming?

    Cheers

  • 11-25-2007 02:14 PM In reply to

    Re: Add Sharepoint List Items with InfoPath

    I'm having difficulties deleting items from a SharePoint list so I thought I'd post here in case there's something obvious I'm missing.  I've been able to succesfully add new items and update existing items using the UpdateListItems web service.  And I'm not getting any sort of error message that says the delete failed but the item remains in the list so it's definitely not working.

    Here's my CAML:

    <?xml version="1.0" encoding="UTF-8"?>
    <Batch OnError="Continue">
        <Method ID="1" Cmd="Delete">
            <Field Name="ID"></Field>
        </Method>
    </Batch>

     

    And here's the JScript code:

    batch = XDocument.DataObjects["TimeActivityDeleteCAML"].DOM;
    batch.selectSingleNode("/Batch/Method/Field[@Name='ID']").text = id;

    //Update the list
    var update = XDocument.DataAdapters["Update"];
     
    try {
         var xml = update.Submit();
    }catch (err) {
         XDocument.UI.Alert("There was an error updating the information: " + err.message); 
    }

    TimeActivityDeleteCAML is my secondary data connection to the CAML mentioned above.  Update is my secondary data connection to the UpdateListItems web service.  Like I said, it works fine for updates.  The only difference between the update and delete is the update CAML contains an entry for the field being updated and the code contains a line to set that value.

    Am I missing something obvious?  Any help would be appreciated since I've been staring at it blankly for a while now.

    I'm using InfoPath 2003 and SharePoint 2007.

  • 12-03-2007 08:18 AM In reply to

    Re: Add Sharepoint List Items with InfoPath

    I followed every step in your tutorial :)....I get the msg box data was submitted but nothing appears on the list. Please advice :)

     Thank you.

  • 12-03-2007 09:25 AM In reply to

    Re: Add Sharepoint List Items with InfoPath

    My first question is are you sure you got the GUID correct?  Next question is what are the data types in your SharePoint list?  You have to careful with dates and lookup fields.

  • 12-04-2007 08:01 PM In reply to

    Re: Add Sharepoint List Items with InfoPath

    Dear Matt

     I have tried this solution of your and ufortunatly it works on some list and not the other. its quite frustrating and i have repeated the step a few times and no results. it work perfect on a list and then when i create another list  in exactly the same manner the infopath for doesnt work, i have recreated the form, checked the guids etc no avail.

    Also i notice that once the form does work, and if i change the list structure like add another column or so and replicate it on the infopath side like update the data sources, xml file etc it stops to work again.

     I dont really get any error as that form says it was successfully submitted but there are no entries in the list...is there a way to trap errors that sharepoint list throws.

    <?xml version="1.0" encoding="UTF-8"?>
    <Batch OnError="Continue">
        <Method ID="1" Cmd="New">
            <Field Name='Title'></Field>
            <Field Name='FName'></Field>
            <Field Name='Lname'></Field>
        </Method>
    </Batch>

     I have also checked the guid of columns..

     

  • 12-04-2007 10:39 PM In reply to

    Re: Add Sharepoint List Items with InfoPath

    Hey Guys

     Any one out there was able know how we can trap the error when infopath talks to sharepoint.

    when i submit the infopath form to add entry to sharepoint list, i dont get any error desings"form successfully submitted" but no entry to the list. Can you suggest anyway if the entry failed in sharepoint how can i trap the error at infopath end.

  • 01-24-2008 11:58 AM In reply to

    • LGrote
    • Not Ranked
      Male
    • Joined on 01-23-2008
    • Seattle, WA
    • Posts 3

    Re: Add Sharepoint List Items with InfoPath

    yonah,

    I have been trying to follow your wonderful example here, but am running into a problem everytime I try and submit the Form.

    It keeps giving me the following:

    The following error occurred:

    'attributes.0' is null or not an object
    File:script.js
    Line:48


    with my Line 48 being:

    fields.text=XDocument.DOM.selectSingleNode("//my:"+fields.attributes[0].text).text;

    Any ideas?

  • 11-20-2008 01:05 PM In reply to

    Re: Add Sharepoint List Items with InfoPath

    Hello Matt.  Sorry to resurrect such an old post, but I am having no luck.  I can do this at the root of the site with no problems, but even one layer in does not work.  I can get the list displayed in the form no problem, but the insert never works (except in the root list).  I have checked (about 40 times) the GUID for the list and for each of the columns and nothing.  Here is my CAML:

    <?xml version="1.0" encoding="UTF-8"?>
    <Batch OnError="Continue">
        <Method ID="1" Cmd="New">
             <Field Name="Title"></Field>
             <Field Name="Last%5Fx0020%5FName"></Field>
             <Field Name="First%5Fx0020%5FName"></Field> 
        </Method>
    </Batch>

     I tried it with just text (Last Name) with the same results - 'you have sucessfully submitted the form' but no data in the list.  What am I missing?

    Fishman
Page 8 of 8 (119 items) « First ... < Previous 4 5 6 7 8
Copyright © 2003-2007 Qdabra Software. All rights reserved.
View our Terms of Use.