Just add isScorable to Student as a calculated attribute. In the microflow retrieve the Course by association and return Course/IsScorable. Now you can conditional display your row :)
Several different ways to skin this one. If I am correct in assuming that a student can be in more than one course, you could do the following:
If you just want to display scores, you could put a nested datagrid inside of your student dataview, datasource would follow the association between Student and Course and then you would use XPath to limit the displayed objects to only those courses with IsScorable = true
if you want to edit scores, its a bit more complex. Use a nested TemplateGrid with same datasource and xPath as the datagrid described above. In the rows of the TemplateGrid, use a FormLoader (from the appstore) that loads a form with the course name and grade and has commit microflows on each editable field to commit the changes
hope that helps.
The row visibility boolean will only work with attributes of the entity you are using in your form - not with any associated entities. So you'll need to build your form to account for this. One way would be a slight modification of my previous answer:
This will enable you to use the row visibility on the Course dataview form to show or hide the Score field.
Mike, How should i go about if a Student takes only one Course. (my actual app with different entities does not have many-to-many)? The summary of my question is that my attribute and the boolean that decides visibility are in separate entity..so am not able to use row-visibility in dataview. No grid is involved in my problem.
Actually, my form has a specific need to control visibility of a field. Only issue being that the boolean that determines its visibilty lies in another entity associated to the main entity. So I dont know how to use row visibility for this situation, because the row visibility wont let me select a boolean that exists in a other associated entity.
Mike and others who replied, Thanks for replies and explanations. I would like to add that I found a simpleton solution for my problem above. What i did was to make a data view of Course inside Student dataview. Then made a table and row with visibility criteria in that dataview. Inside that restricted-visibility-row, i put a new dataview whose source is from microflow. And this microflow gets called with Course (self) and also the parent i.e. Student...so in that microflow i dont have any activity but just return that Student from microflow. That is used as datasource of that embeded dataview of Student. And then I can add a text field for the attribute Score..and all this inside the restricted-visibility-row. Mendix climbed up in my favorite chart.