View Single Post
Old 12-16-2020, 02:06 PM   #106
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
@capink: a random thought. I think that you can get a usable form of action branching if you add an option to run an action only if a template returns a value. You would add this option as another column in the chain links table. Doing this would permit creating a chain where actions are run only if they make sense for the current book.

You could simplify things by requiring use of a zero-parameter stored template. That would ensure you only need a name in the table, and as a side effect would make it easier for the user to test the template.

You could go a bit further and add a check for what the template returns (another column?). If the template returns that value then the action is run. If it does not, the action isn't. That would permit using the same stored template in multiple places.
chaley is offline   Reply With Quote