First of all, thank you for your answer!
I indeed followed the documentation and the first part works fine. My problem is in the SetFilter method, more precisely in the next line:
where = "SKUDepartmentID = " + departmentId;
I don't know how I can change this line in a way, so that it filters on categories. I guess the problem lies in the fact that one news article can subscribe to many categories. So, I was thinking maybe I should change the CategoryName condition (see image below) instead of the Where condition. I don't know, however, how I can change this property dynamically.
