View Single Post
Old 12-16-2020, 08:57 AM   #101
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,454
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by compurandom View Post
I would like to calculate a value and then use it in a action chain.

Specifically, I want to check which of two devices is connected (I know how to do that), and then either search for books with a (device specific) tag along with other search parameters, or pick a specific premade search (depending on which device), and remove the tag, along with other device non-specific actions on the same set of books.

If I could branch within the chain, that would make this easy, but it would be easier if I could pick a search or use a calculated constant...

Is there a way to do this currently? (or could it be added?)

Edit: I think I figured out how to do it (untested yet) by just prefixing the chain with a search that will come up empty on the wrong device and then duplicating the chain for each device. But it would be more elegant if I could use a calculated value.
I confess I don't fully understand what you want to do, but it seems that using a template search might do the trick. See the description of template searches in https://manual.calibre-ebook.com/gui...arch-interface.

Last edited by chaley; 12-16-2020 at 09:00 AM.
chaley is offline   Reply With Quote