Condition in CAML Query
-
29 มิถุนายน 2555 12:59
Using SharePoint Designer 2007;
My list look like this
ID FirstColumn Service Other column1 Other Column 2 1 ABC All ppppp uuuu 2 BCA All yyyy jjj 3 DDD First uuu jj 4 EEE Double iiii jj
I'm trying to display the list data using dataview webpart using SharePoint designer. Below is my query
<View>
<Query>
<Where>
<And>
<Eq><FieldRef Name="ID"/><Value Type="Text">{ItemID}</Value></Eq>
<Eq><FieldRef Name="Service"/><Value Type="Text">{xxxxx}</Value></Eq>
</And>
</Where>
</Query>
</View>
I'm getting the FirstColumn and ID value as input from query string , with these values, I need to get the value of Service column, so I need to have a condition like
xxxxx= if(FirstColumn = BCA) then return All
How do I have a condition within CAML query? Any ideas?
--Cheers
- แก้ไขโดย Prasath C 29 มิถุนายน 2555 13:19
ตอบทั้งหมด
-
2 กรกฎาคม 2555 5:09
I did a workaround for this by creating another data view web part for the same list and passed the value of Service between the webparts.
--Cheers
- ทำเครื่องหมายเป็นคำตอบโดย Lhan HanModerator 3 กรกฎาคม 2555 4:43