Just before I start here my sessions in Moscow I'll do a quick posting that the CAML girl has prepared for me on another exciting feature of the U2U CAML Builder tool. You can download this tool from our SharePoint site. See  my previous posting for the link and a tutorial on how the use of the tool to create CAML queries.

Update List Items

When connected to your SharePoint site in Web Services mode, you can update list items with the CAML Builder. Right-click the list you want to modify and choose the menu option UpdateListItems.

A control with 2 tab pages will be displayed. On the first tab of this control. On the first tab of you can decide what you want to do when an error occurs during updating, on which list version you want the updates to happen or on which view. 

On the second tab you can build your items to Update.

Click the Add button to add your first update method. In the Select list box you can choose if you want to Update an item, add a new item or delete an existing item. In this example we will update an item and create a new item.

After you have selected the Update method, you have to add the fields you want to modify:

  • select a field in the fields list box
  • fill out a value in the text box
  • click on the ">" button to add the field to the method node in the left treeview

Don't forget to add the ID field for the item(s) you want to update.

With each step, you will see your CAML change in the CAML Editor pane.

If you want to modify a value of a field added to one of your method nodes in the left treeview, click on the field node, modify its value and click on the ">" button again. If you want to modify the command of one of your methods, click on the method node in the left treeview and change the selection in the Command list box. You can even remove a field or a method by clicking the node in the left treeview and then clicking the Remove button.

You can test your CAML by clicking the "Test" button in the CAML Editor pane. 

If no error occurred during the execution of your update, you'll see an error code 0 in the ErrorCode column. In that case you can click the "+" button in the grid and click on the link "Result row" to see your update. If an error occurred during execution, you'll see the error code together with the error message.

Now, a lot of you have asked why she does not start a blog. I try to push her but she's a bit shy on all of this. Maybe with some nice emails, you can persuade her (karine@u2u.be)  :-) Thanks CAML girl for this update.