You have two options depending on the action:
- If the action supports scopes, you can do it by setting a scope in a manner similar to the post right above yours. You use template scopes, and start from the currently selected books and restrict down using whatever criteria you want.
Code:
program:
book_ids = '';
for id in from_selection('id'):
if $#my_custom_column then
list_union(book_ids, id, ',')
fi
rof;
book_ids
- If the action does not support scopes, you can use the above template in the "Search Using Template" action. Just be sure to check the option "Template output is a comma separated list of book ids". And of-course you have to make sure the option "select all book resulting from template" is also checked