First to avoid formation: For each unit, just by their rank and name field, set their 'Special:' to None. This will make them start where you put them.
To make them get up upon enemy detected you could make a 'X detected by Y'-trigger with a bit tweaked condition-field. Let's say your group has been named sitGroup with sitGroup = group this; in the leader's init-field.
Trigger condition:
Code:
this || behaviour leader sitGroup == "COMBAT"
This would make it so that if enemies are detected within the trigger radius, or the group enters combat mode for some reason, you can use the On Activation to break them out of their sitting.
If you for example have a script running that forces the group to sit down (in this case it is easiest with one script forcing all group members to sit, rather than one script per group member), just make sure it has a named handle (like for example forceSit = [group this] execVM "forceSit.sqf"; in the group leader's init) and you can use terminate forceSit; in the trigger to stop the script from running.
Example On Activation field:
Code:
terminate forceSit; {_x enableAI "MOVE"; _x enableAI "ANIM";} forEach units sitGroup;