Conditional Replacement

Am trying to create a conditional replacement for the first time. I want a card to be created only if the “FrenchEnable” field is NOT empty. Could you let me know what I’m doing wrong? Thanks a lot.

edit: I miss read, nevermind this comment

Your template looks fine and should work.

Thanks for your reply but it’s not working. Only one card should be generated because only one “frenchEnable” field is NOT empty in the whole deck; I’m getting 3,000 cards though. Any ideas?

If you want the cards to be generated when frenchEnable is empty, then you should change {{#frenchEnable}} to {{^frenchEnable}}.

I understood that you want to generate the Card 2 cards when the field is not empty, which what your template should do.

Note that you’ll need to upgrade to the latest Anki version for that to work.

Thanks again for your time.
In fact this deck is for French students who are advanced learners of English and want an all-in-English deck (term on front, definition in English on back). However, they would also like French equivalents for a relatively small number of terms. For these specific Notes I want to conditionally generate Cards (card 2) and put them in a specific deck. As far as I can gather the initial solution (“FrenchEnable” is NOT empty) should generate the card. I hope that helps and would welcome any suggestions. Once again, many thanks (and thanks to Damien too)

The # conditional your are using is the way to go. It should work. Moreover, if you want the cards to be in a different deck, you can use the deck override functionality.

Since it’s not working for you, I suggest you try with the latest Anki version. If you can still reproduce it in 2.1.30, please share a deck with a few cards so we can try to reproduce it using your exact data.