Hi, something similar to this
int shcount, i;
object shList, sh_dob;
send_wait(0,top_object(),"call_attr","contact_handling","sync_fetch","MLIST_STATIC", format("contact = %s AND special_handling.delete_flag = 0", $args.requestor.id),-1,0);
if (msg_error()) {
logf(ERROR, "Error in sync_fetch '%s'", msg[0]);
return;
}
shcount = msg[1];
shList = msg[0];
if(shcount < 1)
{
//iterate trought shList
for (i=0;i<shcount;i++) {
send_wait(0, shList, "dob_by_index", "DEFAULT", i, i);
sh_dob = msg[0];
logf(SIGNIFICANT, "Special handling %s",sh_dob.sym )
}
}