Query Filter in screen with "!=" condition

Hi

I have the below filter in a screen (CUBA 6.10) and it seems the ‘!=’ operator is not accepted.

 <query>
                <![CDATA[select e from busy$CustomerBlotterEntry e order by e.referenceDate desc, e.customer, e.eventType, e.status]]>
                <filter>
                    <and>
                        <c>e.customer.id = :param$customer</c>
                        <c>e.referenceId = :param$reference</c>
                        <c>e.eventType = :custom$eventType</c>
                        <c>e.status = :custom$status</c>
                        <c>e.type != :custom$noType1</c>
                        <c>e.type != :custom$noType2</c>
                        <or>
                            <c>e.type = :custom$type1</c>
                            <c>e.type = :custom$type2</c>
                        </or>
                    </and>
                </filter>
            </query>
JpqlSyntaxException: Errors found while parsing where condition:[(e.eventType = :custom$eventType and e.type != :custom$noType1 and e.type != :custom$noType2)] for query:[select e from busy$CustomerBlotterEntry e order by e.referenceDate desc, e.customer, e.eventType, e.status]
line 1:50 no viable alternative at character '!'

Is there an alternative ?

Regards
Michael

Hi Michael,

Have you tried <>?

Should work I guess.

Cheers
Mario

Hi Mario

Indeed, but with escaping. Not very convenient but it works.

    <c>e.type &lt;&gt; :custom$noType1</c>
    <c>e.type &lt;&gt; :custom$noType2</c>

Regards
Michael