Simple CAML Query Tester using jQuery & SPServices

Body:

So, I can either sound like I’m the nicest guy in the world and say I threw together a little script to make your life easier when testing your CAML queries, or I can be honest and say I’m tired of people saying my scripts don’t work because they don’t know how to write CAML queries…hmmm.. Which to choose… Which to choose…

Regardless, one of the biggest problems when using SharePoint’s Web Services, The Client Object Model, or SPServices is tracking down problems in your scripts. Sometimes it’s hard to know if your CAML query is wrong or if it’s something else in your script. How do you even know if your CAML query is returning the right information??

Well, to help you out I created the very simple script that you can download here. I even made the links to jQuery and SPServices external so all you have to do is drop this puppy in to do you testing. Please note, this script is NOT meant to help you *build* your queries. There are other tools for that. This is purely a testing tool to help you during those “doh” moments.

The script works as follows:

  1. Input your target list name
  2. Input the desired View Fields (using the correct syntax)
  3. Input your CAML query (using the correct syntax)
  4. Press the “Execute Query” button.

Your results will be displayed in a table next to the “Query Results” label. If an error occurs it will also be displayed in the Query Results table. Once you have your query written correctly, you can just copy it out of the text box and past it into your solution.

The script also comes with some default information entered into the text boxes so you can get used to the basic syntax of the queries. You can see a live demo of the script here.

That’s it! Short and sweet… now go enjoy your weekend.

Category: jQuery; Development
Published: 2/10/2012 3:25 PM
# Comments:
]]>

Families in Germany who are facing divers heartiness problem, such persons can buy drugs from the Web without prescription. With the market flooded with divers web-sites selling sundry medicaments, purchasing medicines from th WEB is no longer a trouble for common man. Certain medications are used to treat infections caused by dental abscesses. Of course it isn’t all. If you’re concerned about erectile health problem, you probably know about Xenical and Hoodia. Probably either adult knows about Garcinia. (Read more PhentermineXenical). The symptoms of sexual heartiness problems in men turn on impossibility to have an erection sufficient for sexual functioning. Certain medications may add to sex drive difficulties, so its substantial to cooperate with your health care professional so that the prescription can be tailored to your needs. Preparatory to capture Levitra or other preparation, speak to your dispenser if you have any allergies. Talk to your health care purveyor for more details. Preparatory to ordering this remedy, tell your doctor if you are allergic to anything.