Is it possible to write and if statement in an agent query? Ex., “if($qOrg(qOrg(agent).icontains($Organization)”? If aOrg has a value then the search parameters would be past. If it does not, then this parameter would be ignored.
I tried this: $Prototype=="pRanking"&if($qOrg!=""){$qOrg(agent).icontains($Organization)}&$Rank>=0, but it does not work, nothing is returned.
Ok. I understand the & and |. I was hoping the query could be dynamic based on if an attribute held a value or not. Not to worry, I can do this through action code.
It is a nuance…if the first argument is empty I don’t wan the query to be done, I just want this argument skipped. But, I don’t want it to be and this or that. I understand your point, though. Thanks.
if the first argument is empty I don’t want the query to be done,
But this is exactly what Tinderbox does! If you have two clauses A & B, Tinderbox first evaluates the A clause. If it is false, it does not evaluate the B clause because it knows the result will be false.
Similarly, if you have A | B, if the first clause evaluates to true, then Tinderbox knows the result will be true and does not evaluate the B clause.