1) The following example returns a concatenation of the values of two Textboxes (“FirstName” and “LastName”). This code provider can be used as a value to a third textbox for displaying the full name:
var firstName = form.GetControl("FirstName").GetValue();
2) In the following example, a Code Provider can be used to feed the Lookup Values in a Combobox control with Person objects. Combobox Lookup Values property typically accept an array of items.
var person1 = {ID:1, Name: "John Black", Position: "Operator"};
var persons = [];
//
loop through all person records and create a calculated field