I posted sample code at How to group Smart Groups / Rule for DTTG based on tags? - #6 by DTLow
For specific selection lists, here is sample code
I populate variable notetypeList with a choice of options
set theNoteTypes to (choose from list notetypeList with prompt "Specify Note Type" with multiple selections allowed)
repeat with theNoteType in theNoteTypes