Difference between revisions of "Get attr vals"

From SDU
Jump to: navigation, search
m
(Examples)
Line 20: Line 20:
 
== Examples ==
 
== Examples ==
 
* get first name, last name and email from CR's customer
 
* get first name, last name and email from CR's customer
send_wait (0, this, "get_attr_vals", 3, "customer.fisrt_name", "customer.last_name", "customer.email");
+
<source lang="javascript">
cstName = msg[3];
+
send_wait (0, this, "get_attr_vals", 3, "customer.fisrt_name", "customer.last_name", "customer.email");
cstSurname = msg[6];
+
cstName = msg[3];
cstEmail = msg [9];
+
cstSurname = msg[6];
 +
cstEmail = msg [9];
 +
</source>

Revision as of 13:56, 16 September 2008

To make corrections or additions to this article, select the edit tab above.
To discuss or ask questions about this article, select the discussion tab above.

Overview

Get values of attributes on the root object.

Usage

get_attr_vals(int count, [ string attr_path... ])

  • count - number of attributes to get. It must corresponds to the number of attr_path parameters
  • attr_path - name of the attribute with dot convention (you can ask for value also on subsidiary objects)

Result

You can found values in msg array on a triplicate position (first value is on msg[3], second on msg[6] and so on)

Examples

  • get first name, last name and email from CR's customer

<source lang="javascript"> send_wait (0, this, "get_attr_vals", 3, "customer.fisrt_name", "customer.last_name", "customer.email"); cstName = msg[3]; cstSurname = msg[6]; cstEmail = msg [9]; </source>