Hi
I think you misunderstood the result of your sync_fetch.
list_handlings is not an array of objects, but only a variable of type object, which reflects a result set.
But the single object in that result set/domset is not accissible by [i].
maybe the following will work:
object list_handlings;
int i,found;
object cnt_handling;
int list_count;
send_wait(0,top_object(),"call_attr","contact_handling","sync_fetch","STATIC", "contact = ?",-1,1, this.customer);
list_handlings = msg[0];
list_count= msg[1];
for(i=0;i<list_count;i++){
send_wait(0,list_handlings,"dob_by_index", "DEFAULT", i, i);
cnt_handling=msg[0];
if(cnt_handling.special_handling.sym == "VIP"){
found=1;
break;
}
}
if(found==1)return true;
else return false;
In fact from a performance point of view, you might not need to iterate through a result set at all, but let the db do the work.
object list_handlings;
int i,found;
send_wait(0,top_object(),"call_attr","contact_handling","sync_fetch","STATIC", "contact = ? and special_handling.sym='VIP'" ,-1,1, this.customer);
found = msg[1];
if(found > 0)return true;
else return false;
Hope that helps. Regards
..........Michael