get_list

Document created by Gutis Champion on Dec 9, 2015
Version 1Show Document
  • View in full screen mode

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]);
}
2 people found this helpful

Attachments

    Outcomes