Datatable operation script in Atlas

Source: Internet
Author: User

Result is the datatable returned from the server.
VaR oldrow = result. getrow (0); // gets the row object of row 0 in the datatable.
VaR VV = oldrow. getproperty ("mkbm"); // obtain the value of the field name "mkbm" in the row.
VaR vv1 = oldrow. getproperty ("mkmc"); // obtain the value of the field name "mkmc" in the row.
VaR oldrow1 = result. getrow (1); // gets the row object of Row 1 in the able.

VaR newrow = result. Add ({}); // Add a row
Newrow. setproperty ("mkbm", 112233); // assign a value to the field with the field name "mkbm" in the new row. The value is 112233.
Newrow. setproperty ("mkmc", "Mc"); // assign a value to a field named "mkmc" in the newly added row with the value MC
VaR VV = newrow. getproperty ("mkbm"); // obtain the value of the field name "mkbm" in the row.

// create a able table
VaR _ TABLE = new sys. data. datatable ([
New sys. data. datacolumn ("title", String, "", false, false),
New sys. data. datacolumn ("listid", String, "", false, false),
New sys. data. datacolumn ("completed", String, "", false, false)
], []);

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.