Mass Action: Set multiple values in condition

Oh, do you mean that the table where you’re selecting records is connected to an Aggregate Model? That would make sense. In the Snippet above, I am grabbing the Ids of the selected rows, but if your Table is on an Aggregate Model, you’ll definitely need to be grabbing a different field than Id to insert into the Condition on your other Model.

For example, lets say the table where you’re selecting records is connected to an aggregate Model on Opportunity, showing the SUM(Amount) grouped the AccountId field, with the AccountId field’s Alias Name being: accountId

Then we have some other Model on the page that we want to update to be showing data only for the selected rows’ accountIdvalues. Basically all we need to change is the field we grab off of item.row:

var params = arguments[0],    
    list = params.list,
    selectedIds = skuid.$.map(list.getSelectedItems(),function(item){
       return item.row.accountId
    });
    
var ModelToUpdate = skuid.$M(‘SomeOtherModel’);
var ConditionOnModelToUpdate = ModelToUpdate AggModel.getConditionByName(‘SelectedAccountIds’);
ModelToUpdate.setCondition(ConditionOnModelToUpdateOppIdsCondition,selectedIds);
ModelToUpdate.updateData();