Hi @Ilya_Malyarenko,
yes, I think this should be possible.
If I understand you correctly then you can use the following expression. The variable collection
is a list of the data.
{
check1: {
error: "Document Type invalid for current year posting",
violations: collection[documentType = "S2" and glDate > startFiscalYear]
},
check2: {
error: "Document Type invalid for current year posting",
violations: collection[ledgerType = "GP" and foreignAmount != null]
},
result: ([check1, check2])[count(violations) > 0]
}
Does this work for you?
Best regards,
Philipp