Hi Bill,
A “<And></And>” element is missing. You can only have 2 filters within a logical element but you can nest in order to achieve the desired behavior.
That said, you should not have encountered this problem by using our query designer. It will have built the proper syntax automatically. In the latest versions, the query designer is completely integrated within BIDS (visual studio) which makes things even easier. Any specific reason why you are not using the designer?
<?xml version="1.0" encoding="utf-8"?>
<root xmlns="http://enesyssoftware.com/schemas">
<list title="MasterList" relativeSiteUrl="/sites/field-partner/61EAP/" stripHtml="true" tableName="MasterList">
<fields>*</fields>
<query>
<Where>
<And>
<And> <!-- Added -->
<In>
<FieldRef Name="Customer_x0020_Name_x0020_N" />
<Value Type="Text">@CustomerName!</Value>
</In>
<In>
<FieldRef Name="Product_x0020_N" />
<Value Type="Text">@Product!</Value>
</In>
</And> <!-- Added -->
<In>
<FieldRef Name="Status_x0020_Type" />
<Value Type="Text">@StatusType!</Value>
</In>
</And>
</Where>
</query>
</list>
<sqlQuery tableName="SortList">
SELECT *
FROM MasterList
WHERE Category LIKE 'Current'
ORDER BY Customer_x0020_Name_x0020_N, Title
</sqlQuery>
</root>
I believe you could go a bit further and remove the sqlQuery statement which is better for performance when manipulating large lists.
<?xml version="1.0" encoding="utf-8"?>
<root xmlns="http://enesyssoftware.com/schemas">
<list title="MasterList" relativeSiteUrl="/sites/field-partner/61EAP/" stripHtml="true" tableName="MasterList">
<fields>*</fields>
<query>
<Where>
<And>
<And>
<And>
<!-- Added -->
<In>
<FieldRef Name="Customer_x0020_Name_x0020_N" />
<Value Type="Text">@CustomerName!</Value>
</In>
<In>
<FieldRef Name="Product_x0020_N" />
<Value Type="Text">@Product!</Value>
</In>
</And>
<!-- Added -->
<In>
<FieldRef Name="Status_x0020_Type" />
<Value Type="Text">@StatusType!</Value>
</In>
</And>
<Contains>
<FieldRef Name="Category" />
<Value Type="Text">Current</Value>
</Contains>
</And>
</Where>
<OrderBy>
<FieldRef Name="Customer_x0020_Name_x0020_N" />
<FieldRef Name="Title" />
</OrderBy>
</query>
</list>
</root>
Let me know if it solves your problem.
Regards,