...
- Click the Rules button in the toolbar at the top of the Form Designer.
- Click + to create a new rule and the Edit button to open the rule.
- Set the Name to 'Show orders'.
- In the Rule text area: copy and paste the following:
Code Block |
---|
/*member orderDate orderNumber resultSet */
var x;
if (sc.value.length > 0) {
eval ('x=' + http.get('http://localhost:8082/database/BIRT/ordersByCustomer?cnum=' + sc.value));
var opts= [];
for (var i=0; i < x.resultSet.length; i++) {
if (x.resultSet[i]) {
opts[i] = x.resultSet[i].orderNumber + '=' + x.resultSet[i].orderNumber + ': Date ' + x.resultSet[i].orderDate;
}
}
so.options = opts;
}
|
...