Willie Sims
Posts: 0
Joined: Wed Jul 10, 2013 4:37 pm

Passing data from one user to another user with an alert

Hello I was wondering if there was a way to pass data from one database user to another user?
The issue is that there will be a group of users with specific states or zones they cover. When a truck is being sent from that users state to another I want to be able to update the other users screen and send an alert to them that a truck will be arriving on a certain date.

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Passing data from one user to another user with an alert

You could send a push notification. That's one option. Another option is for the app to check for some condition every x-seconds and show an alert.

Willie Sims
Posts: 0
Joined: Wed Jul 10, 2013 4:37 pm

Passing data from one user to another user with an alert

So use JavaScript to check for any new updates to the Trucks Collection, with an If Condition checking if the User Name Matches The Zone the Truck is being sent to then Alert if True?,
Will this work with the web based app if the page hasn't been refreshed or would the page need to be refreshed for it to fire. I cant set the page to auto refresh because it would interrupt data entry

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Passing data from one user to another user with an alert

Hi Willie,

No, you don't need to reload page. Use this JavaScript code to run a function after a certain period of time:prefunction myfunc() {
alert("passed 3 seconds");
}
setInterval(myfunc, 3000);/pre

Return to “Issues”