AnsweredAssumed Answered

CAML query dynamically

Question asked by ankita on May 27, 2015
Latest reply on Jun 3, 2015 by rbrockschmidt

Hi,

 

 

I want to use a CAML query to retrieve list values dynamically.

 

When I apply filter on the "List View" based on a control, it works fine.

 

But my requirement is to apply filter on the list view based on multiple columns which change dynamically and so I opted for CAML query, on page load it filters the data properly. But on change of data values, filter is not changing.

 

Example: I want to filter data based on "Month" "Year" and "Logged In User". where as the users can choose the Month and year from dropdown and the list view data should be filtered.

 

Can you please help?

 

Current CAML query :

 

<And>

<And>

<Eq><FieldRef

Name='EmployeeName'/><Value Type='Text'>Current
User
</Value></Eq>

<Eq><FieldRef

Name='Month'/><Value Type='Text'>Month</Value></Eq>

</And>

<Eq><FieldRef

Name='Year'/><Value

Type='Text'>Year</Value></Eq>

</And>

Outcomes