Get the active group for sort if not provided