Expression in field definition in director

Is it possible to use expressions to define the value of a field in director?
I would like to assign a value to overwrite a custom field of type string in a service using an expression like the following:
$field_foo$ ? $field_foo$ : $host.defaultfield$
The idea is, that the field will be defined with the string in field_foo, when field_foo is not empty and host.defaultfield otherwise. The $…$ parts are evaluated with the value of this variables but the defined field does not contain the result of the expresseion but a string like
‘value_of_field_foo ? value_of_field_foo : value _defaultfield’

Any ideas how to get the expression evaluated?

Not sure if you need it as using the same field on host and service could be enough because a field of a check command would be overriden by the host which gets overriden by the service.

But if it is needed, usage of Icinga DSL is limited to the argument definition of check commands in the Director which is enough in most cases when you already design it in this way.

Thanks. So it seems, that I cann’t use the DSL here. I wanted to simplify the configuration and had some other cases in mind to generate values of fields too.
I think it would be a good enhancement for the director, when we could use expressions in other places than only in the definition of check arguments.