Skip to main content

Karine Bosch

Go Search
Karine Bosch
  

The Silverlightness of SharePoint

Karine Bosch > Posts > U2U CAML Query Builder Feature Second Version is Released
U2U CAML Query Builder Feature Second Version is Released

It has taken me a long time to get the second version ready because I have been doing a lot of other SharePoint development stuff. But the last weeks I have been working very hard on it.

You can download this new version here. The format is a bit different then for the first version. It is a self-extracting .exe file that you only have to double click to start the installation wizard, thanks to the SharePoint Solution Installer of Lars Fastrup. Thanks Lars for this wonderful tool! For all those that have been working with the first version, choose to upgrade the solution. For the newbies a fresh installation will be started.

The major ameliorations can be found in the Filter On section of the CAML query build page. The value control changes in function of the data type of the field you choose. The windows version of the tool already had that capability but now it is also integrated in the feature version.

For example, if you choose to build a Where clause based on a choice field or a lookup field you will get a populated drop down list from which you can choose a value.

Lookup

In the example below the selected field is of type User. In that case a standard SharePoint people picker is displayed to let you choose a user. For a yes/no field a checkbox is displayed. Leave it unchecked for false value,, check if for a true value.

PeoplePicker and YesNo

If you take a good look at the picture, you'll notice another difference: there is a new section named Preview result. This section will be filled and expanded after you have clicked the Preview button. The section contains a text field that shows you the query you are building and the result grid will contain eventual results. Click the Preview button each time you want to test your query and see the changes to it.

I also want to draw your attention on DateTime fields which are a real pain in the ass for SharePoint developers. When selecting a column of type DateTime in the Filter On section, you can choose between Today and fixed date. 

image

If you choose fixed date, a calendar control will appear.

image

You can also opt to add or subtract a certain number of days from the selected date. In case of a fixed date, the new date will be calculated and the query will look as follows:

image

In case you choose Today,

image

an offset of days will be added to the query:

image

Also fields based on business data can be queried now.

But pay attention with custom field types. You can build queries using custom field types in the where clause, for those who derive from simple data types like text, number, yes/no etc. Those who derive from SPFieldMultiColumnValue still are an issue that need to be solved.

One of the major differences to notice is that the resulting queries are not save into a document library anymore but into a list. Old queries will be moved from the document library to the list so that you don't loose your work. The query field is split into two different fields: Query and ViewFields so that you can use them separately. For those who hated the double quotes in the Query field, there is good news: they are gone :).

Caml Query List

You can download the tool here.

Hope you enjoy the new version! If you have suggestions, don't hesitate to drop them in the comments of this post.

Comments

Nice!

Hi CAML Girl!

Very nice job. And the timing is perfect too :-)

But very do I find the link to your tool?

Kind regards
Lasse
at 17/01/2008 8:18

Re: link to download

Hi Lasse,
The link to the download file is in the first sentence of the second paragraph. You have to click on the word "here".
at 17/01/2008 8:59

I get list does not exist error

Hi,
first of all thank you for making our lives easier!

I've installed your tool, built a query though not getting any results since it by default queries the Caml Query List. After that I went into my Pages library that I want to query and looked up the id of that list (with your great list propery feature). The list and the list id in my query is now changed to that of the Pages library, but when I preview it I get the error that says the list does not exist.

Where have I gone wrong?

This is my Caml List Query item:

List
http://localhost/news/Pages/Forms/AllItems.aspx  
 
ListId
efaa4733-b8e2-45ef-a493-3d7e5ec658bf 
 
Query
<Query><OrderBy><FieldRef Name='Created' Ascending='False' /></OrderBy></Query>
ViewFields <ViewFields><FieldRef Name='ContentType' /><FieldRef Name='Title' /><FieldRef Name='Modified' /><FieldRef Name='Created' /><FieldRef Name='DocIcon' /><FieldRef Name='List' /><FieldRef Name='ListId' /><FieldRef Name='Query' /><FieldRef Name='ViewFields' /><FieldRef Name='QueryOptions' /></ViewFields>


Thankful for any help!
Pär
at 18/01/2008 9:58

Thank you, and thank you again

I found the first version of the CAML builder invaluable. I'm sure this one will be too.
at 18/01/2008 11:56

Updates, Inserts, and Deletes

Hi CAML girl,

Is your tool able to handle updates, inserts, and deletes?  If not, will it be in a future version?

Thanks!
at 24/01/2008 22:36

Practical use

How do I use this great functionality to develop CAML questions on a list somwhere in my Sharepoint environment.

Do I add a contenttype to the list I´m working on or should I be able to choose the list in the Query builder?

I can only figure out how to make Questions on the list of questions.
at 29/01/2008 12:41

RE: Practical use

Mikael,

I don't know if I understood your question well, but as SPQuery can only used on one list, I tought it would be handy if you could build your queries only on the list in which you are located.
To read more details on how to access and use the U2U CAML Query Builder, you can read my first post on it: http://www.u2u.info/Blogs/karine/Lists/Posts/Post.aspx?ID=3
at 29/01/2008 13:08

Today vs Now

A little bit out of scope here, but it's still about CAML queries. Does anyone know why the <Now/>-tag doesn't work in the Content Query Web Part? When I use <Today/> everything works fine, but in my case, I don't want to show items that aren't published yet the current day.

Now I have to do a rather complex filtering in the xsl. Especially complex since only 5 objects should be presented. When I use <Today/> in the query I'll recieve objects that aren't published yet and should not be displayed, so I can't set the limit to 5 in the web part. Instead I set the limit to 100 (you never know how many articles the customer writes) and the filtering on time and count is made in the xsl.

Feels like it must be better way around this problem; hopefully I'm just stupid and missed something, but I must say - I've been googling like !?*# and I can't find anyone with a similar problem. Seems like no-one is interested in the <Now/> tag.
at 1/02/2008 10:38

Problems with resource files in this solution

Hello,

I'm having trouble creating a new list item in the Caml Query List created in my site by this feature.

Clicking on the new button throws the following errors on the server:

#20001: Cannot open file "Resources.en-US.resx" for reading.
(#3: Cannot open file "Resources.en-US.resx" for reading.)
Failed to open the language resource for Fea{DF31ABB1-D432-4fa5-BDB1-25A2A5DD7E86} keyfile Resources.
#20001: Cannot open file "Resources.resx" for reading.
(#3: Cannot open file "Resources.resx" for reading.)
Failed to open the language resource for Fea{DF31ABB1-D432-4fa5-BDB1-25A2A5DD7E86} keyfile Resources.
Localized resource for token 'groupExpColl' could not be found for file with path: "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\Template\Features\U2U Development Utilities\CamlQueryList\schema.xml".

Is there a chance that something is broken in the installer for my region/locale (en-US)?  I searched the 12-hive and definitely didn't find any resx files matching the file names reported in the above errors.

Many thanks!
at 19/02/2008 22:18

Cannot track Resources.en-US.resx error

same issue here, does anyone know hwo to track this type of error? I've seen various posts and it always seems to grind a blog to a halt... as here
at 26/02/2008 16:27

RE:Practical use

Hello again

Thank you for a wonderful tool. Forget my previous question, I was probably half asleep when I wrote it.

 
at 15/04/2008 7:44

thanks!

In my case everyhting worked perfectly well. From adding to using! Thanks!

http://rapid4me.com SE
at 2/10/2009 11:21

problem installing U2UCamlQueryBuilderSolution

At the beginning of the setup, it reports "The Windows Sharepoint Services Timer service is NOT started!". It is, and I restarted from the services MMC. Setup still says it is not, and can not proceed to Next.
at 7/10/2009 2:21

GGFGHFD

hair straightenersCeramic[url=http://www.straighteners-chi.com]ghd straighteners[/url],ghd iv salon styler[url=http://www.straighteners-chi.com]ghd styler[/url],[url=http://www.straighteners-chi.com]ghd mk4[/url],[url=http://www.straighteners-chi.com]ghd hair[/url],[url=http://www.straighteners-chi.com]cheap ghd[/url],[url=http://www.straighteners-chi.com]limited edition ghd[/url],[url=http://www.straighteners-chi.com]ghd hair care[/url],[url=http://www.straighteners-chi.com]http://www.straighteners-chi.com[/url],[url=http://www.straighteners-chi.com]best hair straighteners[/url],[url=http://www.straighteners-chi.com]cheap hair straighteners[/url],We supply Professional hair straightenersCeramic,ghd mk4 ghd straighteners,ghd iv salon styler,ghd the limited edition high gloss ghd iv dark styler is now available as part of the ghd dark or pure campaignCHI flat iron,ghd iv dark styler ghd hair keywords: ghd iv dark styler,ghd iv styler , ghd iv styler straighteners,CHI Hair Straightenersand provide kinds of [url=http://www.straighteners-chi.com]GHD hair straighteners[/url].shop online with cheapest 4-7 day speedy ship time.GHD Hair Straightenercreates the look you want.Hair straightenersprotects your hair while styling.We offer [url=http://www.straighteners-chi.com]cheap GHD[/url],GHD straighteners whichever path you choose,fashion GHD Hair straighteners,perfect hair and loads of style await. this type of ghd iv dark styler had good look,girls are tend to love the beautiful and fashionable things which would make them have a good mood in a daywholesale CHI hair products,they are some specail useful features about this [url=http://www.straighteners-chi.com]ghd iv dark styler[/url] brandHair straighteners,kinds of GHD Hair straighteners.If you want to buy a professional hair straightener or just looking for some good quality flat hair irons,then check out our shop.[url=http://www.straighteners-chi.com]http://www.straighteners-chi.com/[/url] 
at 27/01/2010 14:04

Boni Poker

Since you offered to send sample code, could you kindly send me sample code (c#) demonstrating the use of the dll's for UpdateListItems and GetListItems?I think above all post are great post.The query builder is such a useful tool.Thanks for the post. This functionality and some other will be soon released in the windows version of the U2U CAML Query Builder.
http://www.poker-boni.de/
at 13/02/2010 5:41

http://www.highwaytowatches.com

at 2/04/2010 9:49

hot online store

at 22/06/2010 6:36

good

at 9/08/2010 17:01

coach handbags

Welcome to visit our store, <a href="http://www.UGGaustraliabootsonline.com/">shopping for UGG boots</a>. We offer diverse styles,for example, <a href="http://www.UGGaustraliabootsonline.com/UGG-classic-cardy-5819-c-7.html">UGG classic cardy boots</a>, <a href="http://www.UGGaustraliabootsonline.com/">UGG boots usa</a>, <a href="http://www.UGGaustraliabootsonline.com/UGG-classic-cardy-5819-c-7.html">UGG cardy boots</a>, <a href="http://www.UGGaustraliabootsonline.com/UGG-bailey-button-5803-c-12.html">UGG bailey button boots</a><a href="http://www.UGGaustraliabootsonline.com/UGG-bailey-button-5803-c-12.html">UGG bailey boots</a> and <a href="http://www.UGGaustraliabootsonline.com/UGG-argyle-knit-5879-c-13.html">UGG argyle boots</a>. And now we have <a href="http://www.UGGaustraliabootsonline.com/UGG-classic-tall-5815mulberry-p-29.html">cheap classic tall UGG boots 5815 mulberry</a> and <a href="http://www.UGGaustraliabootsonline.com/UGG-classic-cardy-5819-c-7.html">UGG cardy boots on sale</a>. Of course, you can <a href="http://www.UGGaustraliabootsonline.com/">buy discount UGGs</a> at the end of season. For more information, we have <a href="http://www.UGGaustraliabootsonline.com/UGG-boots-classic-tall-black-p-23.html">UGG boots classic tall black</a>, <a href="http://www.UGGaustraliabootsonline.com/UGG-boots-classic-tall-chestnut-p-24.html">UGG boots classic tall chestnut</a>, <a href="http://www.UGGaustraliabootsonline.com/UGG-boots-classic-tall-chocolate-p-25.html">UGG boots classic tall chocolate</a>, <a href="http://www.UGGaustraliabootsonline.com/UGG-boots-classic-tall-grey-p-26.html">UGG boots classic tall grey</a>, <a href="http://www.UGGaustraliabootsonline.com/UGG-boots-classic-tall-pink-p-28.html">UGG boots classic tall pink</a> and <a href="http://www.UGGaustraliabootsonline.com/UGG-boots-classic-tall-sand-p-27.html">UGG boots classic tall sand</a>, for short classic UGG boots, we have <a href="http://www.UGGaustraliabootsonline.com/UGG-classic-short-black-p-47.html">UGG boots classic short black</a>,<a href="http://www.UGGaustraliabootsonline.com/UGG-classic-short-chestnut-p-48.html">UGG boots classic short chestnut</a>, <a href="http://www.UGGaustraliabootsonline.com/UGG-classic-short-chocolate-p-49.html">UGG boots classic short chocolate</a>, <a href="http://www.UGGaustraliabootsonline.com/UGG-classic-short-grey-p-50.html">UGG boots classic short grey</a> and <a href="http://www.UGGaustraliabootsonline.com/UGG-classic-short-sand-p-52.html">UGG boots classic short sand</a>. It is worth mentioning that coach handbags are alse broght to our store to make a big market position. we all know that <a href="http://www.fashioncoachhandbag.com/">fashion coach handbags</a> are popular in the world, so you can have a detail look on our new products. At the same time i introduce several new styles to you, <a href="http://www.fashioncoachhandbag.com/coach-handbags-new-tribeca-patent-tote-14119-sil <a href="http://www.fashioncoachhandbag.com/new-coach-hamptons-signature-handbags10619-p-1770.html">Coach Hamptons Signature Handbags</a> , <a href="http://www.fashioncoachhandbag.com/coach-handbags-embossed-optic-art-patent-leather-leah-purse-bag-p-1772.html">light blue leather embossed coach handbag</a>, <a href="http://www.UGGaustraliabootsonline.com/UGG-womens-bailey-button-triplet-1873-black-p-144.html">UGG bailey button triplet black</a>, <a href="http://www.UGGaustraliabootsonline.com/UGG-womens-bailey-button-triplet-1873-chestnut-p-145.html">UGG bailey button triplet chestnut</a>, <a href="http://www.UGGaustraliabootsonline.com/UGG-womens-bailey-button-triplet-1873-chocolate-p-146.html">UGG bailey button triplet chocolate</a>, <a href="http://www.UGGaustraliabootsonline.com/UGG-womens-bailey-button-triplet-1873-grey-p-147.html">UGG bailey button triplet grey</a>, <a href="http://www.UGGaustraliabootsonline.com/UGG-womens-bailey-button-triplet-1873-sand-p-148.html">UGG bailey button triplet sand</a> <a href="http://www.fashioncoachhandbag.com/coach-addison-patent-multifunction-cream-bag-p-1677.html">Coach Addison Patent Multifunction Cream Bag</a> and <a href="http://www.fashioncoachhandbag.com/coach-addison-patent-multifunction-grey-bag-p-1076.html">Coach Addison Patent Multifunction Grey Bag</a>. they are all hot selling ones at this season. If you prefer the others, dont worry, we also can offer you, for example, <a href="http://www.fashioncoachhandbag.com/coach-op-art-sabrina-satchel-duffle-bag-tote-12947-brown-p-1785.html">coach opt art sabrina</a>, <a href="http://www.fashioncoachhandbag.com/coach-handbags-embossed-optic-art-patent-leather-leah-purse-bag-p-1771.html">coach optic leah</a>, <a href="http://www.fashioncoachhandbag.com/coach-alex-signature-patent-leather-black-handbag-p-1238.html">Coach Alex Signature Patent Leather Black Handbag</a>, <a href="http://www.fashioncoachhandbag.com/coach-alex-signature-sateen-brown-bag-p-1369.html">Coach Alex Signature Sateen Brown Bag</a>, <a href="http://www.fashioncoachhandbag.com/coach-alex-signature-sateen-purple-bag-p-1557.html">Coach Alex Signature Sateen Purple Bag</a>, <a href="http://www.fashioncoachhandbag.com/coach-alex-zebra-charm-leather-handbag-p-1465.html">Coach Alex Zebra Charm Leather Handbag</a>, <a href="http://www.fashioncoachhandbag.com/coach-audrey-op-art-black-tote-handbag-p-1104.html">Coach Audrey Op Art Black Tote Handbag</a>, <a href="http://www.fashioncoachhandbag.com/coach-black-signature-backpacks-bag-p-1639.html">Coach Black Signature Backpacks Bag</a> and <a href="http://www.fashioncoachhandbag.com/coach-op-art-sabrina-satchel-duffle-bag-tote-12947-brown-p-1785.html">coach sabrina brown</a>. So its a nice choose for you to select the one you like in our store. Welcome!
at 24/08/2010 8:54

photo frame manufacturers in China

We supply affordable

Photo frames: http://www.made-in-china.com/products-search/hot-china-products/Photo_Frame.html

Picture frames: http://www.made-in-china.com/products-search/hot-china-products/Picture_Frame.html 

Glass photo frames: http://www.made-in-china.com/products-search/hot-china-products/Glass_Photo_Frame.html

plus wholesale & trade at factory prices.

We specialized in online shopping for photo frames from a great selection of photo frame manufacturers in China.
at 25/08/2010 4:56

Re: U2U CAML Query Builder Feature Second Version is Released

I have a new post published on one of my personal blogs themed with novelty gifts & creative home furnishings: href=http://www.chinagift-art.com/ - Walking Seasoning Bottles - SUCK UK Robot Cruets, welcome to view it and leave your comments freely. Thanks
at 25/08/2010 5:04

Thanks

Thanks for the article...It was very much impressive...

______
http://www.ldevils.com
at 28/08/2010 14:30

Add Comment

Title


Body *


Your Name


Attachments
Captcha

Enter the code shown above: *

(Note: If you cannot read the numbers in the above
image, reload the page to generate a new one.)