I need 5 logical expressions inside the query record and each operator will have different values between AND/OR.
Discussion posts and replies are publicly visible
Hm ... what exactly is your question? In Appian, we create lists using curly brackets {}.
As per the documentation we can provide only a single logical expression or a list of query filters.
But I have a requirement
a!queryRecordType( recordType: RecordName, fields: {}, filters: a!forEach( items: ruleInput, expression: a!queryLogicalExpression( operator: fv!item.gate, filters: {a!queryFilter(),a!queryFilter(),a!queryFilter()}
True, but a logical expression can take a list of logical expressions.
docs.appian.com/.../fnc_system_a_querylogicalexpression.html
I am getting an error Expression evaluation error at function a!queryRecordType [line 6]: Query has an invalid value for "filters". Filters can only be a list of a!queryFilter() or a single a!queryLogicalExpression(). Received: List of LogicalExpression.
Could you please help me with same code to configure.
Thanks in Advance
I think it's possible to configure a list of logical expressions within the query entity function, rather than within the query record type function.
Thanks for your input but I need this only on query Record
Or you can try the below logic:
a!queryRecordType( recordType: "RecordName", fields: {}, filters: a!queryLogicalExpression( operator: "AND / OR / AND_ALL", logicalExpressions: a!forEach( items: "ruleInput", expression: a!queryLogicalExpression(operator: fv!item.operator, filters: {}) ) ) )
Thanks I have tried this and getting expected results.