SharePoint tips, #1

We’ve been doing alot development with SharePoint these days. Mostly our work has centered around Lists. Added a few workflows, a few statuses that manage the views and it is working well. Pushing data into the lists has been a little bit of a struggle, but here is what we learned:

If you want to figure out what field names to run a “query” on, and they aren’t always named the same as the name the field was created with, then you’ll need to dig into the list details. I recommend running a query that looks something like this:
SELECT tp_Title, tp_Description,
CAST(tp_Fields AS xml) AS Fields
FROM DS_SP_WSSContent.dbo.AllLists

This way you can see the columns that are used and really get a feel for what the column name is called “under-the-hood”. This will be useful to you when you get the results in “rs:data” and have a “z:row” item with an attribute that is prepended with “ows_”.

Another tip is that if you are updating or adding new items to a list, make sure the fields you need to query are part of the view that you pass in. If you query a view that doesn’t have the right fields, you won’t get those fields in the results and they may be vital to the logic.