Data Grid 2 using conditional visiblity of parent data
I'm setting up a Data Grid 2 and need to display data which depends on parent data of the entity shown in the grid. As I see it only allows me to use the current object in the cond vis expression, any suggestions how to achieve this requirement? Example: display a grid with invoices and show a label if the assiociated customer has a specific value.
Bob van Dijk
This is currently indeed a limitation in the conditional visibility department. What I personally do is one of the following options:
I duplicate the associated data in the current object: in your case I would (for example) duplicate the customer id in the invoice object and use that as a baseline to define your conditional visibility. The downside of this, however is that it pollutes your domain model.
I handle conditional visibility due to associated values in my preparation microflow/nanoflow: in the microflow/nanoflow you could create a page helper object for your page which holds the 'Visible' property based on the values of your associations (which you can access in the microflow/nanoflow). You pass this pagehelper it to the page and make the label dependent on the value of 'Visible'.