Unable to see Associations associated with non-persistent entities in list view :-(

0
Hello gurus, I am trying to pull json based data from remote URL, it has array showing details of orders. I created json structure and json mapping. The structure goes like 1 item entity can hold multiple records. Item and records are non-persistent entities connected with each other via association. In list view under data source tab, I tried to search for this association but could not find, what needs to be done to show array of records that I am pulling from remote json output? I am using Mendix studio pro 8.12 Thanks, Ankur
asked
6 answers
0

If you want to show non-persistent objects you will need to use a microflow as datasource, since they don't exist in your database. Alternatively you could create persistable objects and commit them to your database.

answered
0

Thanks Lennart for your response. I used microflow as a data source for list view however problem with that approach was the REST call used to trigger immediately when the page used to load, where as I wanted to trigger the REST service on button click event. If I attach microflow to button click, then under Network tab of chrome developer tool, i could see records in response however they were not getting bound to UI even though mapping was present :-(

Creating persistent objects would also create data footprints hence I cant take this approach forward.

answered
0

Hello Ankur,

 

I have also used JSON structure and Import Mapping to get the data from REST call and do some processing. Objects are non persistent. Please check if you are also doing in the same way.

I have Import Mapping as shown below. I need to get to JSON object using associations mentioned. 

 

below is the entity association created after clicking “Map automatically”

 

And below is how i am fetching the JSON objects after the REST service call.

 

you can send JSONObjectList as output of the microflow, and call the microflow from the List View in the page.

I hope this helps.

 

Thanks,

Guru

answered
0

Hi Guru,

Once we connect microflow with list view, it will automatically pull data and show once list view loads in browser, however I want to populate data on button click event. How can I do that?

answered
0

Need help ...

answered
0

As I conclude, there are following ways to achieve this:

  1. Fetch records using microflow and use the same as a data source in list view but it cannot trigger and fetch on button click event
  2. Use microflow to fetch and store data in persistent entity. The associations of only persistent entities can be use as a data source to list view but why not non-persistent associations be used? This creates un-necessary data foorprints.
answered