Clarity Service Management

get_list 

12-09-2015 05:26 PM

SPEL API methods

get_list

 

Gets item list by where clause. Returns number of objects found and object list as the object. Most often it should be used in conjunction with get_list_values method.

 

Definition:

get_list ( string, uuid, string, int ) ;

string - factory to query name

uuid - user id

string - where clause

int - max number of objects to retrieve (-1 means all)

 

working example:

uuid who; 
send_wait(0,top_object(), "call_attr", "cnt", "current_user_id"); 
who=msg[0];
send_wait(0, top_object(), "call_attr", "api", "get_list", "wf", who, "chg.chg_ref_num IN '311'", -1); 
if (msg_error()) { 
printf("Error %s",msg[0]); 
} 
else 
{
  int count;
  object obList;
  count = msg[1];
  obList = msg[0];
  printf(msg[1]);
}

Statistics
0 Favorited
3 Views
0 Files
0 Shares
0 Downloads

Tags and Keywords

Comments

01-15-2016 08:43 AM

sync_fetch have more parameters than get_list, but i have never used them and don't know what they do

01-15-2016 08:35 AM

I see... I believe that two functions with different names may have different behavior as well... So, I just wanted to confirm it. Anyway, thanks!

01-14-2016 04:34 PM

In general all of them do the same, and can be mixed e.g. get_list used in combination with dob_by_index.

01-14-2016 04:25 PM

Do anyone know what's the difference between get_list and sync_fetch methods?

 

Essentially, both do the same thing (the counterpart of get_list_values methods would be dob_by_index and attrs_by_index).

 

Thanks!

Related Entries and Links

No Related Resource entered.