How can I create logical OR out of IfTrue, IfFalse, and AND?

32 Views Asked by At

I am trying to get Anki to only create a card if field A or field B is not empty. Delightfully, the only operations available to me to do this are testing if the field is present (#A[text]/), if the field is not present(^A[text]/), and nesting these conditions (#A^B[text]/). Interestingly, there is one sort of OR built into this system: #A[hello]/#B[world]/ will create a card if A is not empty OR B is not empty. However, I specifically need (A OR B)[hello]/ and the above will give me one of {∅, hello, world, helloworld} when I need to reduce it to {hello}.

1

There are 1 best solutions below

0
On

Of course, as soon as I post this, I find... a solution:

#A[hello]/#B^A[hello]/

However, this feels a little janky as this requires copying out the text twice which could become extremely unwieldy with significantly long texts.