Calculated fields in view entities and filtering by comparison on entity find

Hello all,

I have a view entity i need to create with a couple calculated fields. The issue i am running into is i need to either have the view entity itself filter out rows or the entity find based on one field equaling another. the calculated field is this

    <alias name="orderBilled" function="sum" type="currency-amount">
        <complex-alias function="COALESCE">
            <complex-alias operator="*">
                <complex-alias-field entity-alias="OIB" field="quantity"/>
                <complex-alias-field entity-alias="OIB" field="amount"/>
            </complex-alias>
            <complex-alias expression="0"/>
        </complex-alias>
    </alias>

and i am trying to filter it with this entity find like below

    <entity-find entity-name="aspen.order.header.POAging" list="orderList">
        <search-form-inputs default-order-by="entryDate"/>
        <econdition field-name="statusId" value="OrderSent"/>
        <having-econditions>
            <econdition field-name="orderTotal" operator="not-equals" to-field-name="orderBilled"/>
        </having-econditions>
    </entity-find>

it builds the having block correctly as it should in the backend query but does not do the filtering like it should. ideas, comments thoughts?

1 Like

What’s the actual output, and the expected output?

My guess is something to do with the view entity code that doesn’t factor in your use case of it.