Data Grids over Many to Many Associations

1
I have a domain model with three entities A, B, C which are associated with the following joins: A 1-* B B * - * C One of my pages is passed an object from entity C whose attributes can be displayed in a data view. Nested inside this data view I have a data grid which displays objects from entity B (including related attributes from entity A) where there is an association to the object of entity C in the data view. This is achieved by setting the data source for the data grid to use the association between B and C. However with this setup I am unable to filter the results on the data grid based on a Boolean attribute of entity B. Is there another method by which this can be achieved?
asked
3 answers
2

If you use a Xpath to retrieve the data of B and A you can at the same time set a filter with the "and" command. For example: AttributeOfB = true.

answered
0

Mariette is correct - you should use XPath to retrieve your data.

To answer in a bit more depth, let's say we have 3 entities:

  • Contractor
  • Company
  • Region

And a domain model like this:

Contractor * ----Contractor_Company-----* Company * ----Company_Region---- 1 Region

In this case your context / data view entity is Contractor. You can use the "Select..." button to pick a list of Companies for which the Contractor is associated. Then, simply add an XPath constraint like this to filter using a Boolean from region:

[Company_Region/Region/ShowRegion]

If you were filtering on a string attribute, that would look like this:

[Company_Region/Region/RegionName = "USA"]
answered
0

Alternately, you could simply fill the nested data grid by microflow and pass the top level data view object. Retrieving in a microflow action should give you all the customization options you need.

answered