Trying to show the output list of a microflow on a new page with list view

-1
I have a page named “Location” from which I select a particular location, on click action for the location is it calls a microflow, taking location object as a parameter. In the microflow, I retrieve another entity “Office” as a list and put an Xpath constraint that limits the offices that are in the selected location only. The XPath constraint is : [contains(OfficeID, $Location/LocationID)] The microflow then shows a page “OfficeFiltered” which has a list view of entity “Office” and the microflow end event returns “OfficeList” from the retrieve action of the microflow with the XPath constraint. The data source of the page “Office Filtered” is set as this microflow. But all of this, when run, gives me an error ”CE1573 – Parameter “Location” of the selected microflow/nanoflow does not match available arguments. No arguments available to ‘listView1’.” (listView1 is on the page “OfficeFiltered”)   Here is the same microflow
asked
2 answers
3

Hi Sarthak Patel,

You can update your code as below,

  1. From the page Location, when you select a particular location have a ‘Onclick action’ as Show page
  2. That page should have the dataview with Location entity
  3. Add a listview inside the dataview, the listview will have the datasource as microflow
  4. The microflow can be the same as present in your screenshot (retrieving another entity “Office” as a list and put an Xpath constraint that limits the offices that are in the selected location only, return the officelist

This should work, Thanks!

answered
1

Indeed use the power of the page structure.

Though I want to add a bit more:

This XPath [contains(OfficeID, $Location/LocationID)]  gives me the impression you don't use associations properly.

My gestimation is that one Location can contain multiple offices and one office is located on one location?

Then instead of adding ID attributes use associations. Which will allow you to show a dataview wit a single Location and a nested Listview over association showing the referenced offices.

Take a look at this lecture https://gettingstarted.mendixcloud.com/link/module/82/lecture/635/4.8-Associations-in-the-Domain-Model

answered