If you want to select multiple elements in UITable, hold down the shift button. Add Cell Selection callback to the table, selected indices, you'll have in variable event.indices. Since I haven't used it before, you need to verify, if you get indices with every click or when the shift button is released.
function UITableValuesCellSelection(app, event)
indices = event.Indices;
app.results = CalcFunction(app, indices);