Jump to content
Changes to the Jaspersoft community edition download ×

Using Filter Expressions


adrian_32

Recommended Posts

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}[/code]

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    }][/code]

 

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

  • 3 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...