Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Having some trouble finding a list of these variables. Any help would be greatly appreciated. More specifically, when I see this on the page:

<ParameterBinding Name="UserID" Location="CAMLVariable" DefaultValue="CurrentUserName"/>

I want to know what other CAMLVariable exist. This also of course includes ServerVariables as well.

share|improve this question
    
@Mike T: Can you please explain a little more about what you mean here? How are you trying to use these variables? –  Alex Angas Jan 28 '10 at 22:29
    
When editing the xslt in many of the SharePoint's pages, there are references to these variables. I am trying to find more information about them. –  Mike T Feb 4 '10 at 18:28
add comment

4 Answers 4

up vote 1 down vote accepted

Query schema: http://msdn.microsoft.com/en-us/library/ms467521.aspx

share|improve this answer
    
@Mike T, Setting up IntelliSense for CAML in Visual Studio may be a help, too: msdn.microsoft.com/en-us/library/bb507730.aspx @next_con, I've pretty much exclusively used either U2U CAML Query Builder or SharePoint Manager 2007 to get my CAML for SPQuery...please let me know if you think of the other tool you had in mind! –  Anonymous Feb 2 '10 at 18:23
    
I have started to use these as well. The link is a good one. However, I still would like to have a reference to ServerVariables. –  Mike T Feb 4 '10 at 18:26
    
Maybe I'm just being daft, but does this page actually contain a list of CAML Variables? I can't actually find, for example, PageUrl or HttpVDir, which are both included as parameters in standard DVWP definitions. –  Dexter Jul 25 '11 at 9:52
1  
@Dexter, I don't see either how the accepted answer actually answered the OP question. Where are these elusive CAMLVariables actually defined? –  MdMazzotti Jan 23 at 15:19
    
@MdMazzotti, excellent point - I dont think that this question has been answered, by either this answer or others on the page. There is a list of Server Variables here: msdn.microsoft.com/en-us/library/ms524602.aspx (instructions for using them are in Marc D Anderson's answer below), but I still haven't found a source describing the CAML variables. –  Dexter Jan 24 at 1:28
add comment

Here's the reference to Server Variables from my blog: http://mdasblog.wordpress.com/2007/10/19/data-view-web-part-parameters-based-on-server-variables/

share|improve this answer
    
Thanks Marc don't know what I was thinking accepting that other one as an answer, yours and Jaap's are the most useful replies. –  BinaryJam Apr 17 at 8:26
add comment

I can't provide you with a list of CAMLVariables, but here is an interesting link that demonstrates a trick that allows you to be extremely flexible with regards to the values being passed into your ParameterBindings.

share|improve this answer
    
I just posted the same answer as above on your interesting link, Jaap. Server Variables are going to be easier to work with than that trick, IMHO. –  Marc D Anderson Feb 7 '10 at 14:32
    
You are right when we only need the URL variable, but the stackoverflow answer provided at the url in my answer above shows a menthod that is not limited to the available Server Variables. You could construct ANY string in your C# code and "inject" it. –  Jaap Vossers Feb 7 '10 at 15:11
    
Thanks Jaap don't know what I was thinking accepting that other one as an answer, yours and Marcs are the most useful replies. –  BinaryJam Apr 17 at 8:26
add comment

There is another reference I can't seem to find now, but it helps to build and test your queries in something like Stramit CAML Viewer or U2U CAML Creator.

share|improve this answer
    
thanks mike use this all the time, the old u2u tool, cant stand the newer version. –  BinaryJam Apr 17 at 8:25
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.