There are a number of ways you could model this. I think what you are trying to do is have a dynamic count of the number of rows in a Data Grid 2. You want this count to update when new objects are created or existing objects are delete. Here is how I modeled this:
I created this domain model:
This design assumes there is always only one ComplaintCount object in the database. To accomplish this, I created a nanoflow called GetOrCreateComplaintCountObject:
Nanoflow CreateComplaintView:
Nanoflow DeleteComplaintView:
Finally, the page I created:
NOTE: the delete button calls the DeleteComplaintView nanoflow. The New Complaint view button calls the CreateComplaintView nanoflow.
This page updates the object count dynamically.
Hope this helps,
Mike
I would suggest to bind Dataview with nanoflow and then call this microflow inside nanoflow. In nanoflow, you have refresh activity that you can use if data is not refreshed automatically.
This does'nt work
I'm using nanoflow as datasource
In nanoflow I'm calling my MF
Value on frontend is always as it was in the page load, after reload, value is correct :(
I have tried different approach, retrieve data from db and then change object with Refresh in client, but this also doesn't work.
To be honest, this is basic case, that should not required spending many days to solve :(
Can you include a screenshot of your page (in Studio Pro)?
When you asked the question initially, did the dataview on your page have the microflow as the datasource?
I have tried with data source that is microflow and is nanoflow.
I can simplify this example. Show correct total after delete or create.
After deleting on the same page
Can you just provide working demo application where this basic case is handled?
With Nanoflow