Page 1 of 1

Passing data from one user to another user with an alert

Posted: Fri Jan 17, 2014 6:17 pm
by Willie Sims

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.


Passing data from one user to another user with an alert

Posted: Fri Jan 17, 2014 6:31 pm
by maxkatz

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.


Passing data from one user to another user with an alert

Posted: Fri Jan 17, 2014 6:58 pm
by Willie Sims

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


Passing data from one user to another user with an alert

Posted: Fri Jan 17, 2014 7:37 pm
by Kateryna Grynko

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