Unable to update UI-Only field in Aggregate Model I’m attempting to calculate % of opps in drawer of opps.
A field renderer doesn’t work because I can only run the code once the context for the table has been applied for all rows to make renderedlist complete.
This snippet seemingly is good to go except the updateRow function does nothing.
var params = arguments[0], OppsBySPByStageDrawerTable = skuid.$M('OppsBySPByStageDrawerTable'), models = [OppsBySPByStageDrawerTable], listSum, $ = skuid.$; // loop through all models used in drawers to update their percentOfOpps within drawer $.each(models, function(m,model){ $.each(model.registeredLists, function (l,list){ listSum = 0; $.each(list.visibleItems, function(i,item){ listSum = listSum + item.row.countId; }); $.each(list.visibleItems, function(i,item){ model.updateRow(item.row,{percentOfOpps: item.row.countId / listSum}); }); }); });