The actual terminal will give you the selected row. A -1 indicates no row selected. This assumes you are using a selection mode of "0 or 1 Items". If you use "0 or More Items" or "1 or More Items", then the terminal's datatype is an array, indicating the selected rows.