get_object_values

Document created by Gutis Champion on Dec 9, 2015Last modified by Gutis Champion on Mar 7, 2016
Version 2Show Document
  • View in full screen mode

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'
  
2 people found this helpful

Attachments

    Outcomes