I have a jsTable (sv_inmem/temp) attached to a form. I am creating this table from a dataset. I was wondering if there is a way to run a calculation on a column in this temp_ table like any other table. Currently I am having to loop through the dataset and make any calculation before I convert it to a URI and attach it to the form. I am trying to do as much through the foundset as possible without having to manipulate the dataset manually in the code.
for (var k = 1; k<=_dsParts.getMaxRowIndex(); k++) {
if (_dsParts.getValue(k,16) == 'true') {
_dsParts.setValue(k,16,'<html><img src="media:///NotPostable.png"></html>')
} else {
_dsParts.setValue(k,16,'')
}
}
var uri = _dsParts.createDataSource('workOrderParts');
var _jsForm = solutionModel.getForm('formName_frm')
_jsForm.dataSource = uri
var _success = forms.formName_frm.controller.recreateUI();
I saw this was fixed today with the release of 5.0.1: [fix] 255057 Setting value in dataset using the named column doesn’t work. Having the ability to set a value using the column name would make my looping through datasets much easier to read. But, I’m not sure how to use this.
I tested this and it is a great improvement from the get/setValue! Previously I was dealing with 30-40+ columns and having to count over to figure out which column I needed to reference. Thanks!