How to insert a value from an unsaved model into a contains condition and not query the whole databa

I think you will get you desired behavior if you conditionally render the button so its not available until PostCode is not blank. 

The only way to get the opposite effect - clearing out the condition value and requerying the second model - will be with some Javascript.  Action framework value injenction can not currently enter a blank value.