This makes sense looking at it, except for the $group_field_value = array() … I’m not seeing how that’s used(?) …
That aside it seemed like it would work, but there is no change on the field in the post edit screen and there’s no obvious changes or additions in the postmeta.