Field depends on country in primary_address


I’m trying to show a custom field in DocType Customer depending on the primary address country.

I tried: == 'specific country'
but it seems that all fields of doc.customer_primary_address are undefined. Is there a way to access this value?

Second question:
I created a DocType for groups of countries, so for example to check if the belongs to “European Union” entry. I assume I must use the in_list?

DocType Country Group has a table entry of DocType Country Group Entry which works fairly well to setup groups.

Any help appreciated