Skip to main content
kavyam0002
Brainy
Dec 7, 2021 1:55 PM UTC
Solved

How can apply filter for multiple values

            a!queryFilter(
              field: "compliantFlag_txt",
              operator: "=",
              value: "yes"
            ),
            a!queryFilter(
              field: "compliantFlag_txt",
              operator: "=",
              value: "No"
            ),
            a!queryFilter(
              field: "proposedAction_txt",
              operator: "=",
              value:"Released Proposed"  
            ),
            a!queryFilter(
              field: "proposedAction_txt",
              operator: "=",
              value:"Delete Proposed"  
            )

how can i write these 4 filters into 2 filters... 

    Participating Frequently
    Dec 7, 2021 2:33 PM UTC

    a!queryFilter(
      field: "compliantFlag_txt",
      operator: "in",
      value: {"yes", "No"}
    ),
    a!queryFilter(
      field: "proposedAction_txt",
      operator: "in",
      value: {"Released Proposed", "Delete Proposed"}
    )

    Additionally I would use constants for filter values instead of hard coding them.

    2 replies

    mikes0011
    Brainy
    Dec 7, 2021 2:29 PM UTC

    Can you clarify what your desired eventual behavior will actually behave like?  What is the context surrounding these filters?  Any additional detail you can provide beyond a 1-phrase subject line will help if you're after helpful answers here.

    The Expression Guru
    Participating Frequently
    Dec 7, 2021 2:33 PM UTC

    a!queryFilter(
      field: "compliantFlag_txt",
      operator: "in",
      value: {"yes", "No"}
    ),
    a!queryFilter(
      field: "proposedAction_txt",
      operator: "in",
      value: {"Released Proposed", "Delete Proposed"}
    )

    Additionally I would use constants for filter values instead of hard coding them.