none
Condition in CAML Query

    คำถาม

  • 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
    29 มิถุนายน 2555 12:59

คำตอบ