A transition condition in a workflow

I need the transition to take place after adding the metadata value “datanadania”. (The “datanadania” metadata exists, is empty and optional).
I set a condition in the workflow:
{% if workflow_instance.document.metadata_value_of.datanadania %} True {% endif %}
and trigger as metadata modification.
Unfortunately this doesn’t work for me.
I checked the document’s sandobox, it is correct and the result returns nothing, even though metadata has a value.

I don’t know django templates at all, I’m probably making some simple mistake.
v4.5.5

Your syntax looks good to me but you cannot use workflow_instance in the document sandbox since the template is not evaluated within a workflow. In the sandbox you have to omit the „workflow_instance.“ part.

This completely solves the testing problem.