the other way around

constrain file.field contains value

you would need a constrain as for what you want to do