How to retrieve a list of multiple query names?

Hi there,    I run into the problem of not knowing how to get the list of serviceQueries. In this situation, a customer can configure a tenant, adding different service queries to be displayed on a dashboard. The intention is that all service queries that are selected are displayed on the dashboard. At the moment he only shows 1. In the retrieve action he also only picks up the first. If I put it on all and so it fetches a list, it generates error messages everywhere and I actually get stuck. My question is therefore: how can I retrieve all selected service queries in the same microflow so that it neatly displays one by one side by side on the dashboard?   Thank you in advance!!
2 answers

Hi Jeroen,

This is the page that i want to create with the microflow:

Current domain model:


My question is how to display all the configured service queries in stead of one (the first)?



Hi Patrick,

Your page is built up as DataView (Tenant) > DataView (ServiceInstance) > DataView (ServiceQuery).
A DataView can only show one object (e.g. 1 ServiceInstance), hence the datasource microflow can only return 1 object (in your case a ServiceInstance).

Instead, you could use a List View, to display a list of objects (e.g. ServiceInstances in your case).
You must then adapt your datasource microflow to return a list of ServiceInstances given a tenant.
Given a tenant you can directly retrieve the list of instances, just by following the path.
Finally, inside your listview, you can add the dataview displaying the ServiceQuery, which you can retrieve over association.


n.b.: if you have used the datasource microflow in multipe locations where only a single object is expected, you will get some errors that you will need to handle.

n.b.2: given your model, you could end up with multiple instances of the same query for a given tenant, so I'm assuming that you filter them for the currentAccount or something like that.

Hope this helps,