Is there a Mendix-way to check if an attribute-value does exist in the database-table?

0
Is there a Mendix-way to check if an attribute-value does exist in the database-table? The most straightforward way is to retrieve the table from Database with an XPath contraint [attribute = value]. But that will return me one record if it exists, or Null otherwise. That works fine, but does more than I need to know. I want to do this with as little processing as possible and want a boolean-return only. So without retrieving any record at all.  
asked
1 answers
4

Yes/No

Yes this can be done, though the retrieve activity will remain.

By adding a aggregation/count after the retrieve and an exclusive split which checks if count > 0.

The retrieve + aggregation will result in a Count Select in the database returning the count value, not the object(s).
Thus optimized.

answered