Skip to main content
hritiks4748
July 22, 2024
Question

question related to logical Expression Rule

  • July 22, 2024
  • 3 replies
  • 0 views

Hi All,

i have a query related to logical expression 

as you can see their is a logic mentioned in below code which is i am using in a database table but now i need to use this logic in expression rule to show grid field so any one can help me to implement this logic or you can give any example

we requird the filter on below case where status

in('Started','Pending','Suspended','Resumed','On Going') OR ( in('Cancelled','Completed')AND ModifiedDate >= (GETDATE()-7))

3 replies

mikes0011
Brainy
July 22, 2024

You can do this with the QueryLogicalExpression feature of Appian queries - you merely need to nest your LogicalExpressions (they can luckily be nested basically to any level).  In your case you'd have a parent logicalExpression with the "OR" operator, a query filter with your left condition, then a child logical expression with the "AND" operator and two queryFilters (one for the status and one for the modified date).

hritiks4748
July 23, 2024

thankyou

prasantap0900
July 31, 2024

a!queryRecordType(
  recordType: recordType!abc,
  fields: a!queryLogicalExpression(
    operator: "OR",
    filters: {
      a!queryFilter(
        field: recordType!abc.xyz,
        operator: "in",
        value: "Started"
      )
    }
  )
)

Like that you can continue the queryFilter to get the value.