Using Filter Expressions

I use the WebService Query to call an API script as datasource.
The datasource is a JSON.
To be able to filter on TransportProperties: CTRTYPE  I use $F{PropertyCode}.equalsIgnoreCase("CTRTYPE") as Filter Expression
I get "20 DV" as result.

{
    "Reference": "T03641955",
    "PublicId": "ZIMU-135721-8",
    "TransportProperties": [
        {
            "PropertyCode": "CUSTDOC",
            "PropertyDescription": "Customs Doc",
            "Value": null,
            "DisplayValue": null,
            "Id": 5197
        },
        {
            "PropertyCode": "DG",
            "PropertyDescription": "Dangerous Goods",
            "Value": null,
            "DisplayValue": null,
            "Id": 5198
        },
        {
            "PropertyCode": "CTRTYPE",
            "PropertyDescription": "Container Type",
            "Value": "20 DV",
            "DisplayValue": "20 DV",
            "Id": 5202
        }
    ],
    "Id": 1065
}

This is working great, but when I want to do something similar for ExtraQuantities, I don't get the desired result
$F{Good.ExtraQuantities.UnitId}.equalsIgnoreCase("2")

[
    {
        "OrderItemId": 275,
        "Good": {
            "StockInfoConfig": {
                "ProductId": 408,
                "OwnerId": 5,
                "LocationId": 2875,
            "ExtraQuantities": [
                {
                    "Quantity": 1000.00,
                    "UnitId": 2,
                    "MeasurementUnitId": 1,
                    "Id": 61308
                },
                {
                    "Quantity": 1092.00,
                    "UnitId": 3,
                    "MeasurementUnitId": 1,
                    "Id": 61309
                }
            ],
            "Id": 15327
        },
        "Id": 15327
    }
]

adrian_32's picture
Joined: Sep 2 2019 - 1:40am
Last seen: 9 months 2 weeks ago

The order of items in the result of the filter expression is the same as the order in which those items appeared in the primary expression.

CarrieKReed - 3 years 2 months ago

1 Answer:

swood_1's picture
9056
Joined: Nov 15 2012 - 10:47am
Last seen: 2 years 10 months ago
Feedback