How to auto refresh a page that is being called in a site.
for example, when I click on Change Department and fill the form and submit. the changes must be reflected on the User screen without refreshing manually
Discussion posts and replies are publicly visible
If you're using a record action, you can use refreshVariable() and use the refreshAfter config to refresh the variable that stores the user info.
wont refresh Variable refresh only local variable?.
Will it refresh the current page on the site aswell?
Yes, when you change a local variable, that can cause a chain reaction that causes all the other local variables to also update, and last of all the interface components all refresh, the whole SAIL gets rebuilt from the ground up with all the new values.
refreshAfter : "RECORD_ACTION" could become your very best friend.
AFAIK that's only really needed when using record actions that open in a dialog (though of course in that case, VERY useful and in fact essential!). For related actions that take the user away from the UI, though, the best answer (AFAIK) remains activity chaining through the DB update in the process model.