logicalExpression within logicalExpression

Hi!

I'm trying to put logicalExpression within logicalExpression ( one of them will be with operator "AND" and the other one "OR")

and I dont know how to write it.

Where should I put the logicalExpression with the "AND" operator? for simplify it the "AND" contains the "OR".

local!dataSubset: a!queryEntity_18r3(
entity: #######,
query: a!query(
pagingInfo: a!pagingInfo(1,-1),
logicalExpression: a!queryLogicalExpression(
operator: "OR",
filters: { #### }

  Discussion posts and replies are publicly visible

Parents Reply
  • 0
    Appian Employee
    in reply to Avishagmo

    Stewart didn't specifically add the AND operator at the top level, but that's essentially what's happening in his example. Here's an example with some more filters so you can see how it works:

    a!queryLogicalExpression(
      operator: "AND",
      logicalexpressions: {
        a!queryLogicalExpression(
          operator: "AND",
          filters: {
            a!queryFilter(
              field: "isActive",
              operator: "=",
              value: true
            ),
            a!queryFilter(
              field: "status",
              operator: "<>",
              value: "Complete"
            )
          }
        ),
        a!queryLogicalExpression(
          operator: "OR",
          filters: {
            a!queryFilter(
              field: "type",
              operator: "=",
              value: "Top"
            ),
            a!queryFilter(
              field: "region",
              operator: "=",
              value: "West"
            )
          }
        )
      }
    )

Children