getGroupsFormula function

Extract grouping formula from a saeTrafo object