Generating List of Data for Empty Fields

Hi! I am relatively new to Mendix so please bear with me. I am trying to create a function that will generate a list of entries that have data missing (i.e., speakers for an event entering their information but not entering certain fields such as email or last name). In other words, I want a list of names that have not completed every attribute. I was looking into XPath constraints for this but am not sure how to configure one to look for blank attributes, is this the best way to go about such a task? Thanks in advance!
2 answers

Hi Mady,

If you add a data grid that’s currently showing a list of Speakers, you can create an Xpath query that will return Speakers where particular attributes (like “email” or “last name”) like this:

[email = empty or lastName = empty]

 I hope this helps!



Basically you can add a calculated Boolean attribute e.g. _Uncompleted to your entity. The called microflow behind this attribute can return a Boolean value calculated like this:

$Speaker/attr1 = empty or
$Speaker/attr2 = empty


But, you cannot use a calculated field in a Xpath. Alternatively, you can retrieve all bookings and filter this list with a list operation (filter _Uncompleted equals true)

A calculated field is bad for performance. Instead of this you can store the Boolean field and then you need to manage this field “manually”: during the create/update of the object or with a before commit event.