The way you've written it would perform filtering in memory. Here's a microflow that accomplishes this almost exactly like your psuedo-code:
https://modelshare.mendix.com/models/5ba106c1-80e9-4bf0-8d68-65e5660d5354/three-field-filter
Depending on your data, it may make more sense to do this in one or more database (XPath) retrieves. That would look something like this (I think this will work but haven't tested it):
https://modelshare.mendix.com/models/57697f30-f65a-487c-8cfa-743ea6a05474/database-xpath-searching
You can use a microflow as datasource of a grid and perform your logic. Alternative is a helper object with a reference set to your selected data. Fill that reference set in a microflow.
Cristian,
Could you please put a couple of screenshots up for us?
Thanks!