7 Replies Latest reply on Jun 13, 2019 8:55 PM by medac01

    Unable to print log on web Console - IG

    medac01

      Hello,

       

      I am trying to execute the below code in the web console for an Interactive Grid :

       

      var model = apex.region("SUBCONTRACTORS").widget().interactiveGrid("getViews", "grid").model;

      var amtKey = model.getFieldKey("AMOUNT"); // AMOUNT is a column in the IG .. This is a text field

      var status1 = model.getFieldKey("APPROVAL_STATUS");  // APPROVAL_STATUS is a column in the IG. This is a LOV (List of Value on the grid). If it converts to text working fine

       

       

      model.forEach(function(r) {

          var total      = parseFloat(r[amtKey], 10);

          var status2    = String(r[status1]);

      console.log("Cumm Tot:" + totAmt);      //working fine  --OK

      console.log("Status2:" + status2);      //NOt Working   -- NOTOK

      });

       

      Cumm Tot: value is printing fine in the web console but not Status2 value. Actually I want further to extend the code to compare the 'status2' which is string value

       

      Also tried     var status2    = apex.item(r['APPROVAL_STATUS']).getValue(); not sure if the syntax is correct .. But not working.

       

       

      Thank you in advance.