@rakshithreddy, based on what you have asked. In case both filters $transactionid$ and $anonymousaccountid$ are provided and still do not return any results, the filter will remain as AND through the following logic. However,a detailed description of your use cases might be required so that you don't run into similar "pitfalls" (or NFRs in your case):
<done>
<!-- No Results found by performing AND, hence change the filter to AND if both inputs have been provided else set it to OR -->
<condition match="$job.resultCount$==0">
<eval token="filterType">case(len($transactionid$)>0 AND len($anonymousaccountid$)>0,"AND",true(),"OR")</eval>
</condition>
<!-- Result/s found by performing AND, hence retain the filter to AND -->
<condition>
<set token="filterType">AND</set>
</condition>
</done>
... View more