this is not supported: as soon as the JOBS object is generated you can only change the JCL but not the other attributes. This applies to HOSTs as well as HOSTGROUPS (evaluating the HOSTG is only an additional step).
You could use "generate at runtime" as mentioned by Mark. This allows you to change/edit the object before the AE generates the object. An alternative is to enable the "attribute dialog" if this will happen often.
Finally: what is the reason to change the host before the job runs on an agent?