The ui.Dialog.setGroupBy method was introduced in FGL=4.01.03. This provides a way to have a grouping column that the rows in your Table will be grouped by. Rows with the same group value will be kept together.
Any sorting of the table will still keep these rows together and the users sort will be a secondary sort. It is the SQL equivalent of ORDER BY grouping-column [,sort-column].
Read more at
https://4js.com/ask-reuben/ig-185/