I have a query rule which takes the value of a query filter in ri!transactionTypeId of type Number (Integer) array.
a!queryFilter( field: "transactionTypeId", operator: "IN", value: ri!transactionTypeId ),
I have also have ignoreFiltersWithEmptyValues: true.
When I parse "null" as my test input, my data returns the values correctly. It also returns the correct data if I input a number.
However, when I call the rule from my interface and parse a local variable i.e. local!transaction.transactionTypeId which is a Number (Integer) into ri!transactionTypeId, the query rule is not returning any data when local!transaction.transactionTypeId = null.
I noticed the value is parsing as null(Number (Integer)). So I tried fn!tointeger(null) as the test input in my query rule I also get no results returned. However just 'null' works.
How do I get it to recognise the null value and to ignore the filter?
EDIT: in order to get this working I've added the applyWhen as per below
a!queryFilter(field: "transactionTypeId",operator: "IN",value: ri!transactionTypeId,applyWhen: not(rule!AAA_CMN_IsEmpty(ri!transactionTypeId))),
Discussion posts and replies are publicly visible
© 2020 Appian. All rights reserved.