Quote:
Originally Posted by ownedbycats
Something like if 'value' in groupsearch (or inlist?) where groupsearch was a few related columns.
I suppose for this case it might make more sense to just combine them together in the template itself with a list_join or something.
|
A grouped search term (gst) is in effect a way of giving a name to a set of searches, one for each column in the gst. It doesn't have a value outside of a search.
To do what I think you want you need to invoke the search. For example, if you want to know if a gst will match the current book then something like this:
Code:
program:
globals(ids = '');
if ! ids then
ids = book_values('id', '@gst:true', ',', 0);
set_globals(ids)
fi;
$id in ids
The template finds the id of all books matched by the gst and saves it in globals for efficiency. It then checks if the current book id is in the list, returning '1' if so and '' if not.