Quote:
Originally Posted by capink
I am not sure whether the above is explained clearly.
|
It is explained clearly, I just create a list of IDs for every format type and set the scope for the corresponding actions to these ID lists:
Code:
program:
# Get existing lists of book_ids
zeitung_ids = globals(zeitung_ids);
zeitschrift_ids = globals(zeitschrift_ids);
# Set the book variable otyp to the type
otyp = switch(field('title'),
".*\s+\(\d\d\.\d\d\.\d\d\d\d\)\s*", "Zeitung",
".*\s+\(\d\d/\d\d\d\d\)\s*", "Zeitschrift",
"Unbekannt");
set_book_vars('otyp',otyp);
# Add to correspdonding id list
if otyp == 'Zeitschrift' then
zeitschrift_ids = list_union(zeitschrift_ids, field('id'), ',');
set_globals(zeitschrift_ids)
elif otyp == 'Zeitung' then
zeitung_ids = list_union(zeitung_ids, field('id'), ',');
set_globals(zeitung_ids)
fi
Works GREAT -