Count Attributes of several Entities

0
For the visualization of a progress I need the number of attributes of several entities. Short description: I am showing the progress of the object robot with the help of a progress bar. For this I want for the Current Value the True values of all attributes which are connected with the object "Intebtriebnahmepaket". Minimum is 0 and Maximum are all Boolean values of the objects which are connected with "Inbetriebnahmepaket". Does anyone have an idea how I can best approach this?      
asked
2 answers
1

Hi Dominik,

 

You could use the MxModelReflection module for this. After proper configuration of this module, one can read the content of the model. For example, the entity MxObjectMember in this module contains all the attribute in a specific entity (MxObjectType). 

 

So you could create you own domain structure, and populate this based on the data in MxModelReflection. Then put some nice visualizations on your structure. 

 

Hope that helps, 

Regards, Thijs

answered
1

Thank you for the answer.
However, I did not want to specify additional tables.

 

As an input for my solution I found the following page.

https://bartgroot.nl/mendix/we-dont-need-no-mxmodelreflection/

 

For those interested.
I have now solved this with a JAVA action.
I have passed the objects to the action and retrieved the attributes there with the method getMembers. After that you can count the number of attributes with .size and return it as an integer.

 

answered