Better conditional card generation

Is your feature request related to a problem? Please describe.
Here’s an example:
I have a .csv with a bunch of Greek vocab, and one of the columns is part of speech (noun, verb, etc). I’d like to have a single note type of Greek vocab, then be able to make several card types which only generate if type=noun, or something similar. Right now, it only checks if the field is blank ( {{#X}} {{/X}} or not.

There are a lot of ways I see myself using this and it would make Anki a lot better I think.

Describe the solution you’d like
I’d like to see {{#X:Y}} Z {{/X}}, where Z is only displayed if X==Y. Maybe more operations like !=, >, <, etc? Support for lists/strings, where if X contains Y?

Describe alternatives you’ve considered
Multiple note types, boolean fields (Noun?, Verb?, Adjective?, etc.), JavaScript.
The import process is a lot easier with a single note type, and I think it’s better organized that way.
Boolean fields will just multiply the number of fields from 15 to something stupid.
I could try JavaScript, just not well documented. Not sure if it would even work. I’m not certain of compatibility across platforms.

I couldn’t find any add-ons.

Thank you for considering!

I was missing an IF-THEN.
When it’s flexible like that, we can do different things. But I think there are complications.
Your case is simpler, I think. Maybe they’ll do it.

And so I would create a field where I could write the card type(s) I want to create. And then maybe the add-on could delete the types you don’t need, either before or after. But either way, you’ll have to change the card types’ code yourself.

Workaround for now: you can generate all card types then suspend the ones you don’t need by searches (e.g. search for -type:noun (card:2 or card:3) and suspend the cards).