I have a UiApp, that has a FlexTable, each row represents a locations. These locations are marked by checkboxes, the users seletc them and when they execute the save function I'd like to update the table so that only the selected rows remain.
...
var checkbox_sorszam = []
var rows_to_del = []
for(var i = 0; i < locations_data.length; i++)
{
if(e.parameter['checkboxischecked'+i] == 'true')
{
location_list.push(e.parameter['checkbox_value_'+i]);
checkbox_sorszam.push(i)
}
if(e.parameter['checkboxischecked'+i] == 'false')
{
rows_to_del.push(i)
}
}
This way I have the index of rows that need to be deleted
for (var d=0;d<rows_to_del.length;++d)
{
Logger.log(rows_to_del[d])
tarhely_table.removeRow(rows_to_del[d])
}
I get an 'Invalid value: row' error. I tried parseInt(rows_to_del[d]), same results. I prefer not creating a new table but to delete rows which the users did't select.