CQWP filter greater than a number on a calculated field does not work
-
10-12-2020 - |
Вопрос
I have a calculated column that produces values from 0 to 20. While filtering the query for items greater or equal to 16 I still get all the values. The result of the Calculated column is a number (and not a text).
The query does successfully the filtering on another parameter (open, close).
The 2 parameters are correlated by AND (must be open and must be above 16).
Why it is not working?
Решение
I have tested this and it works for me:
Replace the QueryOverride
property in the exported webpart as below (updated column names according to your list columns) and re import the webpart.
Rating is a calculated column in the query below with an output of type number. Status is a Choice field (dropdown)
<property name="QueryOverride" type="string" >
<![CDATA[
<Where>
<And>
<Gt>
<FieldRef Name='Rating' />
<Value Type='Number'>1</Value>
</Gt>
<Eq>
<FieldRef Name='Status' />
<Value Type='Choice'>Close</Value>
</Eq>
</And>
</Where>]]>
</property>
Не связан с sharepoint.stackexchange