Skip to content

This is the best expression builder, but filter doesn't build all conditions #2

@YanbinGaoSensorup

Description

@YanbinGaoSensorup

Here is the filter, but the expression stops before the siteId condition.

Not sure if I use this correct or not, please be advise. Thanks!

const filterExpr = expressionBuilder.filter([
[["isDeleted", "not_exists"], "OR", ["isDeleted", "=", false]],
"AND",
[["assetReference", "begins_with", "site"], "OR", ["assetReference", "begins_with", "well"]],
"AND",
["siteId", "exists"],
"AND",
[["endTime", "not_exists"], "OR", [["startTime", "<=", ${filterEndTime}], "AND", ["endTime", ">=", ${filterStartTime}]]],
]);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions