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

Hi Louis, I’m not sure if this is what you on Field from Another Model conditions there is a property (in the Value part)  where you can choose what happens “If No Row in Source Model” - try setting this to “Abort this Model’s query”  rather than deactivating the condition.   Then you can have your model actions activate the condition (and set its value if you want) when the condition field is updated.

I did this having a “dummy” model with one unsaved row so this method may not work if your other model already has one or more saved rows.  

OOh, also, depending on when you load the other model, you can just not load the one you’re filtering until the other model’s field is updated and it activates the condition and queries the first model.

Was this helpful at all?  If this doesn’t work for you, I think you can use javascript to decide when the condition is applied.