Help get this topic noticed by sharing it on Twitter, Facebook, or email.

How to get selected data from Call $app.touch.show?

Hi,

May i know, how can i get the selected data from grid1 if i call the controller from client side?

$app.touch.show({
controller: 'MyCountroller',
startCommand: 'Select',
startArgument: 'grid1'
});
1 person has
this question
+1
Reply
  • Use javascript to get the results. COT has very little documentation on this, but you can mess around with $app.execute in the developer console of your browser to see how it behaves. I did notice a quirk with pageSize / pageIndex, it only goes so high and then it doesn't work. So you have to implement some type of paging mechanism using the pageIndex parameter or keep your results to a smaller number like 1000.

    $app.execute({
    controller: 'MyController',
    view: 'theView1',
    pageSize: 1000,
    done: function (result) {
    var calc = 0;
    var rcount = result.MyController.length;
    for (var i = 0; i < rcount; i++) {
    if (result.MyController[i].MyField != null) {
    // do something with the data....
    var value = result.MyController[i].MyField
    }
    }
    }
    });
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated happy, confident, thankful, excited kidding, amused, unsure, silly indifferent, undecided, unconcerned

  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated happy, confident, thankful, excited kidding, amused, unsure, silly indifferent, undecided, unconcerned