Fixed to reset filterXml as each filter is processed. Otherwise, when it's set to the IsNull/IsNotNull format, it'll end up getting applied to all the rest of the filters. (#475)

This commit is contained in:
Jeff Burt 2018-04-27 10:28:52 -05:00 committed by Vesa Juvonen
parent 719171081f
commit 87e30dd02a
1 changed files with 2 additions and 1 deletions

View File

@ -62,12 +62,13 @@ export class CamlQueryHelper {
// Store the generic filter format for later use // Store the generic filter format for later use
let query = ''; let query = '';
let filterXml = '<{0}><FieldRef Name="{1}" /><Value {2} Type="{3}">{4}</Value></{0}>'; let filterXml = '';
// Appends a CAML node for each filter // Appends a CAML node for each filter
let itemCount = 0; let itemCount = 0;
for(let filter of filters.reverse()) { for(let filter of filters.reverse()) {
filterXml = '<{0}><FieldRef Name="{1}" /><Value {2} Type="{3}">{4}</Value></{0}>';
itemCount++; itemCount++;
let specialAttribute = ''; let specialAttribute = '';