Not Exist between this date

Hi everyone, Can appian do this query? I would like to query all of the data of the merchant without transaction between a specified date range and show it in the read-only grid, I already have view table  but I can show all of the merchant without transaction between a specified date range.

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    Appian a!queryFilter() supports "BETWEEN" operator however it does not support something like NOT BETWEEN. To achieve the same you can refer to the code below.

    a!queryEntity(
      entity: cons!ENT_MERCHANT,
      query: a!query(
        logicalExpression: a!queryLogicalExpression(
          operator: "AND",
          filters: {
            a!queryFilter(
              field: "transaction",
              operator: "is null"
            ),
    /* Option-1  To get the data BETWEEN two dates*/
            a!queryFilter(
              field: "transactionDate",
              operator: "between",
              value: {"01/01/2022","12/31/2022"}
            ),
    /* Option-2  To get the data NOT BETWEEN two dates*/
            /*a!queryFilter(*/
              /*field: "transactionDate",*/
              /*operator: "<",*/
              /*value: <STARTDATE>*/
            /*),*/
            /*a!queryFilter(*/
              /*field: "transactionDate",*/
              /*operator: ">",*/
              /*value: <ENDATE>*/
            /*)*/
          },
          ignoreFiltersWithEmptyValues: true
        ),
        pagingInfo: a!pagingInfo(
          startIndex: 1,
          batchSize: -1
        )
      )
    )

Reply
  • 0
    Certified Lead Developer

    Appian a!queryFilter() supports "BETWEEN" operator however it does not support something like NOT BETWEEN. To achieve the same you can refer to the code below.

    a!queryEntity(
      entity: cons!ENT_MERCHANT,
      query: a!query(
        logicalExpression: a!queryLogicalExpression(
          operator: "AND",
          filters: {
            a!queryFilter(
              field: "transaction",
              operator: "is null"
            ),
    /* Option-1  To get the data BETWEEN two dates*/
            a!queryFilter(
              field: "transactionDate",
              operator: "between",
              value: {"01/01/2022","12/31/2022"}
            ),
    /* Option-2  To get the data NOT BETWEEN two dates*/
            /*a!queryFilter(*/
              /*field: "transactionDate",*/
              /*operator: "<",*/
              /*value: <STARTDATE>*/
            /*),*/
            /*a!queryFilter(*/
              /*field: "transactionDate",*/
              /*operator: ">",*/
              /*value: <ENDATE>*/
            /*)*/
          },
          ignoreFiltersWithEmptyValues: true
        ),
        pagingInfo: a!pagingInfo(
          startIndex: 1,
          batchSize: -1
        )
      )
    )

Children
No Data