Another Address Book Problem - adding to groups this time

I am trying add entries to a group. When I code the group name as a literal it works but when it is a variable it fails. The following works:

add new_person to group "A group name"

The following fails:

group_name="A group name"
add new_person to group group_name

Does anyone have any idea why? TIA.

I figured it out. I can’t explain why but I needed to add “as string” to the end. It must be the way I built the variable to begin with. Sorry for the bother.