Use case:

Define an array of rows on a model given 2 conditions then update rows with value 'myValue'

For given conditions:

ApptID__c = XXXX

DateA > DateB

$.each(myModel.data, function (i, row){

myModel.updateRow(row,myField, myValue);

});

How do I limit the rows based on my conditions?

Define an array of rows on a model given 2 conditions then update rows with value 'myValue'

For given conditions:

ApptID__c = XXXX

DateA > DateB

$.each(myModel.data, function (i, row){

myModel.updateRow(row,myField, myValue);

});

How do I limit the rows based on my conditions?

- 2,798 Points
- confundido

Posted 5 years ago

Moshe Karmel, Champion

- 8,656 Points

$.each(myModel.data, function (i, row){

if(row.ApptId__c === XXXX && row.DateA > row.DateB){

myModel.updateRow(row,myField, myValue);

}

});

Moshe Karmel, Champion

- 8,656 Points

Rob Hatch, Official Rep

- 44,508 Points

Thanks Moshe! We do very much appreciate our champions. Hopefully undying gratitude is sufficient compensation.

Rob Hatch, Official Rep

- 44,508 Points