0
我一直試圖利用使用setfilter的但似乎不工作設置篩選 - 不等於(<>)不工作NAV 90
FOR i := 1 TO ARRAYLEN(ItemGroupFilter) DO BEGIN
IF i <> ARRAYLEN(ItemGroupFilter) THEN BEGIN
IF ItemGroupFilter[i] <> '' THEN
IF ItemGroupString = '' THEN
ItemGroupString := '<>' + ('%' + FORMAT(i))
ELSE
ItemGroupString := ItemGroupString + ('|%' + FORMAT(i))
ELSE
ItemGroupString := ItemGroupString;
END ELSE BEGIN
IF ItemGroupFilter[i] <> '' THEN
IF ItemGroupString = '' THEN
ItemGroupString := '<>' + ('%' + FORMAT(i))
ELSE
ItemGroupString := ItemGroupString + ('|%' + FORMAT(i))
ELSE
ItemGroupString := ItemGroupString;
END;
END;
Item.RESET;
Item.SETFILTER("Item Group",ItemGroupString,ItemGroupFilter[1],ItemGroupFilter[2],ItemGroupFilter[3],ItemGroupFilter[4]);
其結果是,只有第一ItemGroupFilter [1]是做這份工作。從OR(|)之後,它不起作用
Message Values:
ItemGroupString = '<>%1|%2|%3|%4'
ItemGroupFilter[1] = '1'
ItemGroupFilter[2] = '2'
ItemGroupFilter[3] = '3'
ItemGroupFilter[4] = '4'