Archive for February, 2010

SharePoint Column Names

Friday, February 26th, 2010

For example: Column name “Upload Comment” is actually stored as “Upload_x0020_Comment”. I actually knew this from looking at code in SharePoint Designer, but it never occurred to me that this caused  my UpdateListItems (Cmd=’New’) web service to fail. It failed by not inserting the item, not by flashing “Error Will Robinson” messages at me. So, I replaced spaces in column names with “_x0020_”, and it worked. The java code to do this is: replaceAll(” “,”_x0020_”);

So instead of:  <Field Name = “Upload Comment>A Comment</Field>

I used this: <Field Name = “Upload_x0020_Comment>A Comment</Field>

I am using a java program to build javascript that invokes the UpdateListItems web service. The datasource is Lotus Notes. At this point, you must copy the javascript into a content editor web part. The script builds the javascript including a button. Clicking the button makes the magic happen. More on this later.

Good article concerning this is at http://httpcode.com/blogs/CommentView,guid,fb4a2a24-c1e7-4f23-9317-5ae7f1430036.aspx

SharePoint Sequence Number - [ID]

Tuesday, February 23rd, 2010

I am developing software that uses SharePoint Web Services (UpdateListItems) to add or bulk load items into a list from a Lotus Notes extract. More on this later when I finish. Sequence numbers are not one up numbers from the last item (last item + 1). Instead they are true sequence number, similar to Oracle and Sybase. I found this out by bulk loading a few items then deleting them and reloading. So, if you are starting from a scratch list or a list that you have not loaded/deleted any items from, then this is not big deal. However, if you have loaded/deleted items, then the numbers will be out of sequence.

As far as I can tell, there is no sequence number reset. Too bad.