I would like to write CAML query for SharePoint 2007 which have Contains query.
The only problem is that I want to use logic like:
If my search query has value, search for that with contains query If my search query is empty, select all items from list
I have tried with several queries (this is my null case):
<Query>
<Where>
<Or>
<IsNull>
<FieldRef Name="ImageFilter"/>
</IsNull>
<Contains>
<FieldRef Name='ImageFilter'></FieldRef>
<Value Type='Text'></Value>
</Contains>
</Or>
</Where>
</Query>
And
<Query>
<Where>
<Contains>
<FieldRef Name='ImageFilter'></FieldRef>
<Value Type='Text'></Value>
</Contains>
</Where>
</Query>
But nothing works,
Could you please help me with that?