|  01-16-2021, 08:58 AM | #256 | 
| Wizard            Posts: 1,216 Karma: 1995558 Join Date: Aug 2015 Device: Kindle | 
			
			No. Action chains does not give you the ability to name templates. This can already be done in calibre using stored templates (preferences > template functions). Action chains only gives you the ability to set an icon and a tooltip for the condition, to be used as kind of visual cue of which conditions this action/chain will run under. | 
|   |   | 
|  01-16-2021, 09:43 AM | #257 | |
| Wizard            Posts: 1,026 Karma: 500000 Join Date: Jun 2015 Device: Rocketbook, kobo aura h2o, kobo forma, kobo libra color | Quote: 
 Would it be possible to either add a button in the plugin dialog to bring that up, or at least mention it in the post documenting conditions? Or is it there and I missed it? | |
|   |   | 
| Advert | |
|  | 
|  01-16-2021, 09:48 AM | #258 | 
| Wizard            Posts: 1,216 Karma: 1995558 Join Date: Aug 2015 Device: Kindle | 
			
			What version of the plugin are you using? The tooltip and icon fields are in the conditions dialog right at the bottom. If you mean you want a button to calibre's stored templates, I can add that.
		 | 
|   |   | 
|  01-16-2021, 09:51 AM | #259 | 
| Wizard            Posts: 1,026 Karma: 500000 Join Date: Jun 2015 Device: Rocketbook, kobo aura h2o, kobo forma, kobo libra color | 
			
			I just noticed clicking on the pulldown like a button opens the template editor. Somehow I never thought to try that before. | 
|   |   | 
|  01-16-2021, 10:05 PM | #260 | |
| Custom User Title            Posts: 11,352 Karma: 79528341 Join Date: Oct 2018 Location: Canada Device: Kobo Libra H2O, formerly Aura HD | Quote: 
 Another question: If I want to switch to a saved search at the end of a chain, is Selection Modifier the right way to do that? | |
|   |   | 
| Advert | |
|  | 
|  01-16-2021, 11:35 PM | #261 | |
| Wizard            Posts: 1,216 Karma: 1995558 Join Date: Aug 2015 Device: Kindle | Quote: 
 If you want to just display the search results without making any selections, you can use this custom action instead, just type the following in the template dialog: Code: search:"=my_saved_search" | |
|   |   | 
|  01-17-2021, 06:06 AM | #262 | 
| Grand Sorcerer            Posts: 6,686 Karma: 12595249 Join Date: Jun 2009 Location: Madrid, Spain Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2 | 
			
			I have a doubt. Let's say I have an action that includes to set some custom columns, that doesn't exist in all the libraries. Is it possible to execute the part that is common in all the libraries and the part about custom columns only in the libraries where they exist?
		 | 
|   |   | 
|  01-17-2021, 07:12 AM | #263 | |
| Grand Sorcerer            Posts: 12,525 Karma: 8065948 Join Date: Jan 2010 Location: Notts, England Device: Kobo Libra 2 | Quote: 
 | |
|   |   | 
|  01-17-2021, 08:01 AM | #264 | |
| Grand Sorcerer            Posts: 6,686 Karma: 12595249 Join Date: Jun 2009 Location: Madrid, Spain Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2 | Quote: 
  ) | |
|   |   | 
|  01-17-2021, 09:20 AM | #265 | 
| Grand Sorcerer            Posts: 12,525 Karma: 8065948 Join Date: Jan 2010 Location: Notts, England Device: Kobo Libra 2 | |
|   |   | 
|  01-17-2021, 12:08 PM | #266 | 
| Wizard            Posts: 1,216 Karma: 1995558 Join Date: Aug 2015 Device: Kindle | 
			
			chaley's new template function is a lot better than setting conditions with library name.  The problem with both approaches is that the plugin will validate each action in the chain before running it, and if single action has problems (e.g custom column not in current library) the whole chain will be disabled. I will see what is the best approach to deal with this. | 
|   |   | 
|  01-17-2021, 12:23 PM | #267 | |
| Grand Sorcerer            Posts: 6,686 Karma: 12595249 Join Date: Jun 2009 Location: Madrid, Spain Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2 | Quote: 
 | |
|   |   | 
|  01-17-2021, 12:59 PM | #268 | 
| Wizard            Posts: 1,216 Karma: 1995558 Join Date: Aug 2015 Device: Kindle | 
			
			The condition chaley suggested is per action. It is currently not going to work. I think the solution to this would be to validate only actions that are going to run under the current conditions. So if you set a condition on an action using chaley's new function, the action will only be validated if the condition is true. I hope the explanation makes sense.
		 | 
|   |   | 
|  01-17-2021, 01:22 PM | #269 | |
| Grand Sorcerer            Posts: 12,525 Karma: 8065948 Join Date: Jan 2010 Location: Notts, England Device: Kobo Libra 2 | Quote: 
 However, unless I am misunderstanding I don't think the problem is as large as you indicate, at least for template actions. Looking at check_template() I see that the template is run to see if it produces an error. Assume the template looks something like this Code: program:
    if field_exists('#somefield') then
        do_something();
        do_something_else()
    fi | |
|   |   | 
|  01-17-2021, 01:30 PM | #270 | |
| Grand Sorcerer            Posts: 6,686 Karma: 12595249 Join Date: Jun 2009 Location: Madrid, Spain Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2 | Quote: 
 So, essentially, instead of using "Edit Metadata", I use a function with that template that set the value of the column if it exists. | |
|   |   | 
|  | 
| 
 | 
|  Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post | 
| Action Chains Resources | capink | Plugins | 80 | 09-18-2025 04:45 AM | 
| [Editor Plugin] Editor Chains | capink | Plugins | 106 | 06-17-2025 05:36 PM | 
| [GUI Plugin] Noosfere_util, a companion plugin to noosfere DB | lrpirlet | Plugins | 2 | 08-18-2022 03:15 PM | 
| [GUI Plugin] Save Virtual Libraries To Column (GUI) | chaley | Plugins | 14 | 04-04-2021 05:25 AM |