Help Needed - Filtering a data grid by a previous data grid

Background I am working on an app for my company which will allow us to generate interview packs by choosing questions that are associated to behaviours and indicators. I have created the domain model so the behaviours, indicators and questions are all in separate entities. A question is associated to an indicator and an indicator is associated to a behaviour (You can have multiple indicators to a behavior and multiple questions to an indicator). My Goal The way I see the packs being generated is to first display a list of the behaviours in a data grid where multiple selections can be made. I then want the user to move onto another page where they see the indicators related to the behaviours they chose on the previous page. The user will do the same thing, they will select the indicators they want and on the next page they will get the questions related to those indicators. My Problem The problem I'm facing is that I cant seem to figure out how to filter the list of indicators by the selected behaviours on the previous page. I'm trying to achieve this through a microflow and when I try and filter the list it tells me its the wrong variable type. Any ideas?
1 answers

Hi Leon, I have an idea: You could could create a helper entity called 'indicationSelectionHelper.' Make a many-to-many association between indicationSelectionHelper and Indicators.
In your selection microflow for the list of Behaviors, pass in the list of behaviors into a microflow. In the microflow, create a new indicationSelectionHelper entity. Then iterate through the list of behaviors and retrieve all indicators for each behavior. Associate the list of indicators to your indicationSelectionHelper using the 'Add' option for the reference set.
On the next page, you can have a data view to which you pass the indicationSelectionHelper. Inside that data view, put a Data Grid of indications and populate it over association to the many-to-many association between indicators and indicationSelectionHelper. This will give you a data grid that contains all the indications associated with the behaviors you picked on the previous page. My guess is that the error you are getting is that you are trying to write an x-path constraint that contains a list as a variable.
Hope this helps!