I created domain model with entities school,parent,kid,nurse,and I created overview pages and form pages for every entity, the nurse can register into school by choosing school name using reference selector.After nurse registered in to school nurse can appear with dashboard in that dashboard I would like to display the details like how many kids enrolled in to school ,their related parents ,grade for a particular nurse. Can I implement this with XPATH Or any other method is there??? can any one please suggest me how I can achieve this in mendix. Associations School------nurse(one to many), School------Kid(one to many), Parent -----Kid(one to many),
Let's see if I'm interpreting you correctly:
Case one: You have a dashboard for a nurse, and want to display the kids enrolled in the school for that nurse. If your dashboard 'caller of the page' entity is 'nurse', then you can easily put either a datagrid or a listview in, and use xpath to get the list. The xpath for this is dead-easy. In fact, Mendix pretty much does it for you. When you select the input entity for the grid, Mendix will also show 'nurse' (caller of the page) at the top of the list. You can drill down via the references via school to kids. The appropriate xpath is automatically generated.
Case two: Show the related parents for the kids. Now that you have a dataview with a datagrid, you might as well use it. Datagrids can display column data over associations. Add a new column to the datagrid and click it. Select 'datasource'. You will also see references as possible sources of input. Open the reference to 'parent' and select 'name'. For each kid in your datagrid you will now also see the name of the parent.
Case three: Grade for a particular nurse. Where are these stored? And are you referring to the kids grades? A grade specific for the nurse? The average grade for all kids for that nurse?