Reference field content for other card

Hi, I’m looking for a way to to sth like this:

If field A of card X is “NaOH” and field A of card Y is also “NaOH” than card Z contains the fields B of the cards Y an Z.

Maybe it’s better understandable with an example: Currently I’m studying reactions for organic chemistry and have a field “reactants” and also a field “name of the reaction”. What I want is to create a card that asks “Which recations use NaOH as a reactant?” and have the names of all reactions where the reactants field contains or is equal to NaOH put out.

Does anybody know a way to do this?

This won’t be possible because in a card template, you can only access the fields of the note which owns that card. So if you want a card to ask for some reactions, the note which it belongs to will need to have a field with that information.
But at least you can create those new notes automatically (using Python) since the information needed is already contained in your collection.

By the way, when you say “card”, what you actually mean most of the time is “note”. I hope my answer also clarifies the difference.

2 Likes

Thanks for the reply.
Unfortunately I don’t know Python good enough to do that.
Sorry for the confusion about card and note (I’m german an in German this distinction doesn’t make sense).

Sorry for the confusion about card and note (I’m german an in German this distinction doesn’t make sense).

I think the distinction between card and note is particular to Anki. In the German manual, these technical terms are translated as Karte and Notiz. The distinction is quite useful when sometimes distinction is needed.

If you have a couple of minutes, could you give some assistance about how one would approach this?

That really depends on the exact situation and the OP didn’t give all the information. Broadly speaking, you’d need a script that loops over your notes collecting the required data, processes it and then creates new notes from it or loops again over existing notes to insert it in the appropriate places.

1 Like