Add a flag without changing 'mod' field? or other way to create automatically large filtered decks


I am working on an addon that automatically creates filtered decks containing a special selection of cards.

Initially I tried creating a deck that had as query something like “is:due AND (cid:XXXXX or cid:XXXXX or cid:XXXX …)” but I had errors about the query being too long for the sqlite engine.

My idea was then to automatically add an orange flag to the cards, then creating the deck using “flag:2”.

It works fine but it changes all the “mod” values of those cards and forces a reupload, which is not nice for your wallet and not very elegant.

Would you happen to know a way for me to create filtered decks containing specific cards (not notes, hence I can’t use tags) without doing that? So either adding a flag + bypassing the mod change OR bypassing sqlite’s query size limite OR any other way?


There’s the cid:XXX,XXX,XXX... syntax for that. Looks like that needs to be added to the manual.


I just found this out by pure chance right now. Thanks a lot Rumo!!

1 Like

Please note though that building/emptying a filtered deck still needs to modify any matched cards, so they all still need to be synced.