get_list_values

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

SPEL API methods

get_list_values

 

Gets object attribute values from object list that is returned from get_list method.

 

Definition:

get_list_values( uuid, object, int, int, int, ... ) ;

 

uuid - user id

object - object list returned from get_list method

int - start index to retrive (0  means first object in the list)

int - end index to retrive

int - defines wich parameter from this parameter is first that defines attribute name, usualy 0 (zero means that next parameter contains first atribute name to retrieve)

 

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); 
//get_list ( string, uuid, string, int ) ;
if (msg_error()) { 
printf("Error %s",msg[0]); 
} 
else 
{
  int count;
  object obList;
  count = msg[1];
  obList = msg[0];
  send_wait(0, top_object(), "call_attr", "api", "get_list_values", who, obList,0,count,0,"sequence","description"); 
  //get_list_values( uuid, object, int, int, int, ... ) ;
  if (msg_error()) { 
  printf("Error %s",msg[0]); 
  } 
  else 
   {
   int i; 
   printf(argc);
   for (i=0;i<msg_length();i++) { 
    printf("msg[%d]: '%s'", i, msg[i]); 
    } 
   }
}
//output:
//msg[0]: 'wf:400024'msg[1]: 'sequence'msg[2]: '10'msg[3]: 'description'msg[4]: 'test'
2 people found this helpful

Attachments

    Outcomes