Hi all, I want to ask for a help. Right now, I have 2 different reactive application. 1 is for the system configuration, 1 is for the end user application. And there is a case where when an admin make some changes on the screen of their application (the changes will be save in the db), it will be reflected to the end user application's screen where they need to stop whatever they are doing and refresh the page.
It is possible to do it and can someone teach me how? Thank you so much.
I see only 2 possibilities for this.
Hope this helps,
Vincent
Hi Syakir,
You can consider these two simple options as well
1. Every time user perform an action on the screen that sends a request to add/update any information in database, you perform a check whether configurations have been updated. If the new configurations allow user to perform the requested action then let it proceed, otherwise abort the request and show appropriate error message to user.
2. Add a java script on your screen which executes after every few seconds to check if the configurations have changed in database. If java script returns with a configuration change then refresh the screen with appropriate message to the user, otherwise let user continue his work. This one however is not an optimal solution as it involves unnecessary hits to the database.
Hope it helps!
Junaid
When I mentioned Timer I meant the Javascript Interval capability. I would recommend to use this forge component for it as it an easy to use component that you can configure as you like (even at runtime):
https://www.outsystems.com/forge/component-overview/8422/timing-events
If the page is a Form, you can check if is there any changes when submit data and inform the user or reload the page or have other approach.
Otherwise, use timer as mentioned before.
Regards,
João