Problems creating SharePoint List Items where the List has drop-down fields

  • 25 March 2009
  • 2 replies
  • 2 views

Badge +5

I just semi-proved this to myself while playing with a simple K2 blackpoint process.


If I use the "SharePoint List Items" event to create an item on a SharePoint list, that has plain text fields, it works.


If I use the same data to create an item on a SharePoint list that has drop-down fields in it, it falls over. K2 reports the following in it's log...


"229648","2009-03-25 02:21:13","Debug","General","15","GeneralDebugMessage","ProcessInstance.HandleException","15 ServerEvent: Server was unable to process request. ---> Invalid data has been used to update the list item. The field you are trying to update may be read only. ---> Invalid data has been used to update the list item. The field you are trying to update may be read only.","","","vm-moss2007:C:Program FilesK2 blackpointHost ServerBin","229648","01aa3ca6ac674bb3b2e0db4bdeb81e05",""


Can it really be true that the SharePoint integration cannot populate list columns when they are based on drop-downs ?


2 replies

Badge +5

Solved this for myself earlier - I will write a blog post to explain this fully later...


If you want K2 blackpoint to populate a lookup column when adding a List Item to a List in SharePoint, you need to carry the ID of the record through from your form.


i.e. in your infopath form, show the chosen item from the dropdown (based on the SharePoint list that Sharepoint is also using for the dropdown), but store the Sharepoint Listitem ID - not the display value.


It does mean you are only carrying the ID in K2 though, rather than the display value. That may or may not be an issue later.


 

Badge +5

I've written it up here...

 

http://www.bagofspanners.com/2009/03/25/creating-sharepoint-list-items-with-lookup-columns-with-k2-blackpoint-and-infopath/

Reply