Changes do not reflect until page is refreshed
Application Type

Hello all,

I'm checking EmailStatus of collaborators in a screen through a Data Action called At Start. There is another screen where I can change the status to Active or Inactive. But in the data action, i have a code where it calls API and checks if the mailbox is invalid for the collaborators despite their Active or Inactive Status. 

The home page (CalendarView Screen) lists all the collaborators in that showroom.

the grey ones are Inactive and white ones are Active.

Now when I change the switch of Inactive to Active or vice versa and go back to the CalendarView Screen (image above), it should check the valid email through data action which calls the API and set it again to False if invalid. But it doesn't. I have to refresh my page to see the changes.

Why is that? Should I add a refresh code through js somewhere? I can't add it OnReady as it will go into infinite loop.




Reactive doesn't to that far! If you want one page to reload when you change another page you'd have to create a listener (like a "setInterval" in JS) to check and work accordingly.

There's no way of one page to know automatically that other has changed something without refreshing something.

Doesn't redirecting to a page call all the actions in Data Actions, On Ready and On Initialize. 

My logic is in Data Action which is called At the start of the screen load. This should fetch the latest changes done right?


Oh sorry I didn't understand that you were redirecting... in that case it should reload the whole page, yes.

Would you by any chance have set the api method to be cached? 
Perhaps you can share some snippets of your code as well

Hi @Caulibeam,

No, I haven't set the api method to be cached. It is called directly when needed. 

I don't know which code to share as the data is called in a data action, assigned At start to an Output Parameter. This Output Parameter is displayed on screen.

by the way I noticed that, when I change the value through the switch on Collaborators screen, and then redirect myself from the menu to CalendarView screen, the aggregate shows the update valued value as if it is refreshed when the screen is Ready (looks like OnReady). But the variable value didn't change or refresh. 
I guess this might be the issue.



Hi Aman,

If your intent is to save data in one tab and refresh the data in another tab without page refresh, you can use Broadcast Channel API 

Just take a look at the attached HTML files' code. Open both the files in separate tabs and update the content in one or the other. You will see the reflected changes. The "onmessage" handler can be used in your case to trigger the data refresh.

I don't have an OS solution handy with me but you can use the JS used in these files and implement. Also, this is only tested on Chrome browser and you may have to tweak it a little as per your requirement.

Hope this helps.


Hi @Zafar Sultan ,

Unfortunately, my requirements do not match the above answer.

The data is changed/update in another screen within the same tab. When I go back to home page to see the changes reflected, it doesn't show the updated data. Instead I have to refresh the page to see the new changes.

But I dragged the aggregate to the home page (CalendarView) to see if the data is updated in it or not. It turns out it is getting updated, but the variable which has my data to be shown on screen through data action is not getting updated. This might be the issue. I need to refresh the data action somewhere or reassign the values.



Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.