display count of associated objects

0
Hi,  In my sample app, Training management, I am displaying the  number of registered users in a Training overview page. This attribute is modeled as a calculated attribute on Training entity and displays correct value when the page is loaded but it does not get refreshed when a new registration is added. How can I have the new value displayed without refreshing/reloading the Training object (or page). Looks like calculated attribute is not a good option here as it gets calculated only on object retrieval, so what is the better way to display the count of registered users (association) without reloading the page. do not want to use even handlers to update persistent attribute as user registering for an event has no access to update training object
asked
2 answers
1

Hi Ranjit,

please consider to use event handlers or alternatively a microflow that updates the training object.
If you create the function of updating the register count as a sub microflow, being called from the one
triggered by UI action, you should not be running into a permission problem.
I understood that refresh client does not just update the current pop-up page but all pages containing
an object that gets its state updated (at least that's how react works).

answered
0

Hi Ranjit, 

One thing you may want to check is did you “Refresh in client” when you commit a new registration. If that option isn’t checked then it would do what you described. More on that here for changing an object and here for committing an object.

Another option you have is to run a microflow that updates the number you need when a change event happens in a text box, text area, drop down widget, etc or you could run a microflow when the user presses a submit/save button. More info on that here.

answered