Add Sharepoint List Items with InfoPath - InfoPath Dev Sign in | Join | Help in SharePoint Integration InfoPath (Entire Site) InfoPath Dev InfoPath Dev is dedicated to bringing you the information and tools you need to be successful in your Microsoft Office InfoPath development projects. Home Blogs Forums Photos Downloads InfoPath Dev » InfoPath » SharePoint Integration » Add Sharepoint List Items with InfoPath Add Sharepoint List Items with InfoPath Last post 10-05-2010 11:52 AM by Patrick Halstead. 124 replies. Page 5 of 9 (125 items) « First ... < Previous 3 4 5 6 7 Next > ... Last » Sort Posts: Oldest to newest Newest to oldest Previous Next 08-11-2006 09:32 AM In reply to Matt Faus Joined on 08-18-2006 Dallas, Texas Posts 1,558 Re: Add Sharepoint List Items with InfoPath Mark as Not AnswerMark as Answer... Reply Contact Hello Linda and welcome to our forums! I can't seem to see anything blaringly wrong. Maybe you should try putting some values in the elements? I don't think this would cause a problem, but who knows. Matt Faus / Microsoft InfoPath MVPQdabra® Software / Streamline data gathering to turn process into knowledge 08-11-2006 11:31 AM In reply to Lalewicz Joined on 08-11-2006 Posts 12 Re: Add Sharepoint List Items with InfoPath Mark as Not AnswerMark as Answer... Reply Contact Matt,Thanks for the quick response and I also have to extend thanks for your even being here with some good InfoPath information as it seems to be pretty scanty in general.The problem was I was using reserved words LOL. I changed "Title" and "Name" fields to something more descriptive and this error disappeared. Now I have made it to the "No errors but nothing submitted either" point. :) I am not sure whether to count that as progress or not.I made sure just to use simple text fields for my first try. I am working in an environment where making changes on the server is not an option.(Read large security consious organization) But I did change the permissions on my sharepoint site just to make sure that anonymous users could make changes to lists and libraries in case it was a SharePoint permissions problem. I am pretty sure that that is not the stopper here.I know you must be going crazy with so many persons begging for help when you can't be there to see WTH they are actually up to, but I would love it if I could get a clue how to get past this last hurdle.quote:Originally posted by Matt FausHello Linda and welcome to our forums! I can't seem to see anything blaringly wrong. Maybe you should try putting some values in the elements? I don't think this would cause a problem, but who knows. 08-11-2006 11:37 AM In reply to Matt Faus Joined on 08-18-2006 Dallas, Texas Posts 1,558 Re: Add Sharepoint List Items with InfoPath Mark as Not AnswerMark as Answer... Reply Contact Hey Linda,No problem on the helping, it's actually pretty fun, and you seem to be pretty sympathic - you work some kind of support regime at your company?Anyway, about this error. I think we discussed this in pretty good depth towards the beginning of the post. I saw one post that I made on 16 February 2006 : 8:44:48 PM that seemed to have some good information. After several back-and-forths I even posted some screenshots to look at, so hopefully that will help you figure things out.Otherwise, I'm not sure what else to try. I've only done this CAML thing a few times, but I know it can be very powerful. If you figure things out, please let us know what you did! Matt Faus / Microsoft InfoPath MVPQdabra® Software / Streamline data gathering to turn process into knowledge 08-14-2006 11:07 AM In reply to stacey.bailey Joined on 08-14-2006 USA Posts 1 Re: Add Sharepoint List Items with InfoPath Mark as Not AnswerMark as Answer... Reply Contact Matt,I'd like to echo everyone's sentiments about how useful this thread is and how much it has helped. I was able to get an add, change, and delete to work using your approach. I would have never been able to do that without your guidance and expertise.My question, though, is this--is it possible to create a site using this method? There is an administration web serviced /_vti_adm/Admin.asmx, which has a method for creating a site. The writeup for Admin.asmx in the SDK doesn't show XML like the lists.asmx one does and my initial fumblings trying to test it did not prove successful. If we could do this without managed code through InfoPath, it would be great! thanks 08-15-2006 04:08 AM In reply to Lalewicz Joined on 08-11-2006 Posts 12 Re: Add Sharepoint List Items with InfoPath Mark as Not AnswerMark as Answer... Reply Contact Matt and all,I was able to use this technique successfully and would like to say THANKS! and to add a couple of notes and queries.#1) I changed the permissions on my reader group to allow updating on the list. I did not hear this mentioned here and wondered if it was necessary.#2) As you may have seen above I had a field called "Name" in one of my early tries and had to change it to "UserName". SharePoint however did not really change it and when I examined my field names found that SharePoint internally was still calling it "Name" but displaying "UserName". This obviously caused problems.#3) I should think a best practice would be to carefully construct a list in SharePoint that you expect to upadate with InfoPath keeping in mind that column names that can conflict with the XML in the CAML and names with spaces or any other special characters will mean extra work.As always planning in advance always pays off. Now I have to go and see what else you guys are doing up here. :) 08-15-2006 08:02 AM In reply to Matt Faus Joined on 08-18-2006 Dallas, Texas Posts 1,558 Re: Add Sharepoint List Items with InfoPath Mark as Not AnswerMark as Answer... Reply Contact Stacey,You can do pretty much everything through CAML and the SharePoint web services. These web services were created to operate SharePoint and if you hook something up to them, you can control any aspect of SharePoint. I won't be able to help you a whole lot because the experience I have with all this is mainly from writing this one HowTo. You should download the SharePoint SDK and read through the section on using the web services with CAML. After you've read this, then you should be able to accomplish anything with just the web services and CAML!Linda,I'm glad you got everything working and thanks for the pointers! Matt Faus / Microsoft InfoPath MVPQdabra® Software / Streamline data gathering to turn process into knowledge 08-18-2006 10:28 AM In reply to dchong Joined on 08-18-2006 Canada Posts 2 Re: Add Sharepoint List Items with InfoPath Mark as Not AnswerMark as Answer... Reply Contact Great posting!I have one question to ask to expand the functionality of this article. Could this InfoPath form be modified so that I could submit more than one entry to my list? I'm not sure if the web service method will allow it. If it did, would we use the a repeating section to accomplish such functionality? thanksDave 08-18-2006 11:39 AM In reply to Matt Faus Joined on 08-18-2006 Dallas, Texas Posts 1,558 Re: Add Sharepoint List Items with InfoPath Mark as Not AnswerMark as Answer... Reply Contact Hi Dave and welcome to the forums!Yes, you should be able to do this by simply adding another <Method> element with the appropriate fields. You should be able to add as many <Method> elements you like to add as many new items as you want.Good luck and let us know how it turns out! A CAML example that you get working would be awesome! Matt Faus / Microsoft InfoPath MVPQdabra® Software / Streamline data gathering to turn process into knowledge 09-29-2006 02:31 PM In reply to dchong Joined on 08-18-2006 Canada Posts 2 Re: Add Sharepoint List Items with InfoPath Mark as Not AnswerMark as Answer... Reply Contact Hi Matt,Thanks for the response. I haven't had much success in accomplishing this task. I want to be able to one or more items without hardcoding the template. I don't want to be constrained to the number of items I'd like for a single post action. I guess what I need is to dynamically add <Method> elements at runtime. I'm a newbie to the CAML templates. Is what I am trying to accomplish even possible?thanksDavequote:Originally posted by Matt FausHi Dave and welcome to the forums!Yes, you should be able to do this by simply adding another <Method> element with the appropriate fields. You should be able to add as many <Method> elements you like to add as many new items as you want.Good luck and let us know how it turns out! A CAML example that you get working would be awesome! 10-04-2006 04:23 PM In reply to Matt Faus Joined on 08-18-2006 Dallas, Texas Posts 1,558 Re: Add Sharepoint List Items with InfoPath Mark as Not AnswerMark as Answer... Reply Contact You should be able to dynamically manipulate the XML of the secondary DOM anyway you like since the schema is not checked at runtime. However, you might want to work with XML objects in memory for your manipulations and then just serialize them to text when you are ready to submit to SharePoint. Matt Faus / Microsoft InfoPath MVPQdabra® Software / Streamline data gathering to turn process into knowledge 10-06-2006 10:03 AM In reply to yonah Joined on 10-06-2006 USA Posts 10 Re: Add Sharepoint List Items with InfoPath Mark as Not AnswerMark as Answer... Reply Contact Matt, Great article - the tutorial is super helpful. I have read through this list and found an easier way to get the List GUID as well as the appropriate field names for your CAML Template - by Querying the SharePoint database. Please note - this info works for SPS, and YMMV if you're using WSS. It also assumes that you are familiar with Microsoft SQL server and have access to directly query your SharePoint database.1. Go to your database server for sharepoint and find the Database called SiteName_SITE2. Run the following query in your database:select tp_id,tp_Title,tp_fields from lists where tp_title='My List Name'3. The tp_id field is your guid. The tp_Fields field is an XML definition of your fields. The XML has a bunch of field definitions. The Name field is the one you are looking for, that will be the 'name' field in your CAML.HTH,--Yonah 10-06-2006 11:21 AM In reply to Matt Faus Joined on 08-18-2006 Dallas, Texas Posts 1,558 Re: Add Sharepoint List Items with InfoPath Mark as Not AnswerMark as Answer... Reply Contact Thanks a lot for the suggestion Yonah! I'm sure this works great and gives you the true value (as stored in the database) of what you are looking for. Thanks again for the contribution! Matt Faus / Microsoft InfoPath MVPQdabra® Software / Streamline data gathering to turn process into knowledge 10-06-2006 11:54 AM In reply to yonah Joined on 10-06-2006 USA Posts 10 Re: Add Sharepoint List Items with InfoPath Mark as Not AnswerMark as Answer... Reply Contact Matt, glad I could help. But now I am stuck on another point:After figuring out how to get the correct field names and list ID, I want to create a 'Pretty' form to load data into SharePoint. However, the example you gave uses a repeating table. How do I link these guys up with manually layed-out fields? 10-09-2006 09:40 AM In reply to yonah Joined on 10-06-2006 USA Posts 10 Re: Add Sharepoint List Items with InfoPath Mark as Not AnswerMark as Answer... Reply Contact Hey, I did some more searching and figured out how to make this work with a pretty form, I only have two more minor issues with it, that I hope someone can help me workaround:Quick background - I am creating a corporate contacts journal - so that people at our company can determine who spoke to whom at one of our clients. The whole thing posts to a sharepoint "Events" list, so that it can link to an outlook calendar.Here are my two pain points:1. Whenever I try to include the date in my CAML from the datePicker, it doesn't work properly - anyone know how to format it so that sharepoint will accept it?2. I have two dropdown lists on my site - one called 'Company' and one called 'Contact'. I originally set infopath to filter 'Contact' on the value of 'Company', and it worked fine, but SharePoint requires the 'ID' for the company field. If I change the 'Value' property of the 'Company' field to the 'ID' field, the filter doesn't work in Sharepoint. Any way around this?Thanks again for all of your help. 10-09-2006 11:17 AM In reply to Matt Faus Joined on 08-18-2006 Dallas, Texas Posts 1,558 Re: Add Sharepoint List Items with InfoPath Mark as Not AnswerMark as Answer... Reply Contact For #1 I would double-check to make sure that the data types in both places were compatible. You can have a date or a datetime in both InfoPath and SharePoint. Make sure you are not trying to submit a datetime into a date or vice versa.2) Does the Contact table not have the Company ID that it is associated with? I would think that this filter would become easier if you stored the Value as the ID. I'm not quite sure how to help here and would like more information. Matt Faus / Microsoft InfoPath MVPQdabra® Software / Streamline data gathering to turn process into knowledge Page 5 of 9 (125 items) « First ... < Previous 3 4 5 6 7 Next > ... Last » Copyright © 2003-2019 Qdabra Software. All rights reserved.View our Terms of Use.
quote:Originally posted by Matt FausHello Linda and welcome to our forums! I can't seem to see anything blaringly wrong. Maybe you should try putting some values in the elements? I don't think this would cause a problem, but who knows.
quote:Originally posted by Matt FausHi Dave and welcome to the forums!Yes, you should be able to do this by simply adding another <Method> element with the appropriate fields. You should be able to add as many <Method> elements you like to add as many new items as you want.Good luck and let us know how it turns out! A CAML example that you get working would be awesome!
select tp_id,tp_Title,tp_fields from lists where tp_title='My List Name'
tp_id
tp_Fields