CA Service Management

 View Only

get_object_values 

Dec 09, 2015 04:51 PM

SPEL API methods

get_object_values

 

This method allows to get object attribute values

 

Definition:

get_object_values(uuid, string, int, ... ) ;

uuid - user id

string - persistent_id of the object

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)

... - attributes to get values from "atribute1", "atribute2",....

 

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_object_values", who, "cr:400865", 0, "summary");
if (msg_error()) {
  logf(ERROR, "get_failed %s",msg[0]);
}
else
{
int i;
for (i=0;i<msg_length();i++) {
  logf(SIGNIFICANT, "msg[%d]: '%s'", i, msg[i]);
  }
}
//output: msg[0]: 'summary' msg[1]: 'Test incident'
  

Statistics
0 Favorited
21 Views
0 Files
0 Shares
0 Downloads

Tags and Keywords

Related Entries and Links

No Related Resource entered.