getGroupsFormula function

Extract Grouping Formula from an emdi Object