I am trying to implement Notifications on my solution but I want the notification to show to only one user I select.
is there a way to specify to whom you want to send the notification, only in their device and not in others?
You may want to look at something like: https://www.seedcode.com/fmchat/
The "manual" way to do it would be to go by account name (the user name of the filemaker account they are using to log in with. Then you would write records to the table with that name stored as part of the record.
On the client side, you can run a simple script to check for new alerts:
Set Error Capture [ on ]Enter Find Mode [ pause: off ]Go To Layout [ alerts ]Set Field [ alerts::user ; "==" & Get( AccountName ) ]Set Field [ alerts::markread ; "=" ]Perform FindIf [ Get( LastError ) = 401 ] Go To Layout [ original layout ] Exit ScriptEnd If# User is on list of found notifications that have not been marked "read" via the markedread field
Set Error Capture [ on ]
Enter Find Mode [ pause: off ]
Go To Layout [ alerts ]
Set Field [ alerts::user ; "==" & Get( AccountName ) ]
Set Field [ alerts::markread ; "=" ]
If [ Get( LastError ) = 401 ]
Go To Layout [ original layout ]
# User is on list of found notifications that have not been marked "read" via the markedread field
The above also implements a simple "markedread" flag field that you could mark with a value to store that it has been read and not display it to the user. All that's left after that is to style the list view accordingly for your alerts and implement that script wherever you want to run the check (EG OnFirstWindowOpen or as an Install OnTimer Script)
thanks for your time. I am familiar with what you said.
What i really want(maybe I wasnt clear above) is:
-a user able to create appointments assigns an appointment to an employee, lets say Bill. Now Bill has a user account Bill1.
After the appointment is created I want only Bill to receive a Notification about this event he is assigned to. Not other users.
Based on Configure local notifications filemaker added to 17, I was wondering if there was a way to do this.
i hope i was clear now
You do know that the Configure Local Notification script step is for FileMaker Go only right? It doesn't do anything on the desktop or webdirect.
Configure Local Notification - FileMaker Pro 17 Advanced Help
The methodology is not different regardless. You still need to create a table of records to store pending alerts since that script step cannot schedule notifications on a remote device (hence the name Configure LOCAL Notification). You would just add an additional part onto my previous script to push those to notifications.
# After finding outstanding alerts for that userGo To Record/Request/Page [ first ]Loop Configure Local Notification [ your settings here ] Set Field [ alerts::markedread ; true ] Exit Loop If [ Get(RecordNumber) = Get(FoundCount) ] Go To Record/Request/Page [ next ]End Loop
# After finding outstanding alerts for that user
Go To Record/Request/Page [ first ]
Configure Local Notification [ your settings here ]
Set Field [ alerts::markedread ; true ]
Exit Loop If [ Get(RecordNumber) = Get(FoundCount) ]
Go To Record/Request/Page [ next ]
Since you have to do this, why even bother using local notifications? The native FileMaker stuff is less obtrusive since it doesn't send alerts outside of FileMaker. If someone has to deal with a lot of alerts at once, this is much better.
I get what you saying because untill now this is how we have it.
But our client is asking for notifications(i know they are only for Go). Notifications like facebook, insta and stuff without thhe need to enter into the database everytime you get one.
just see the information from notification as it is easier for him.
I will look into in one more time
without thhe need to enter into the database everytime you get one.
Well, that's the problem, since to run the script step it needs to happen in filemaker while it's open and in the foreground. FileMaker Go can't receive pushed alerts remotely when it's not in the foreground.
You may want to look at a different alert system entirely, such as SMS message alerts (if all users are on mobile-ready devices), or email alerts.
I will see what the client will prefer for his best.
Thanks for your time
You can use Notification Centers to send information to, but to be able to do that you need to sign up for a service and then each user have to sent there unique device´s id. With that you can from example FileMaker Server send notification to a device (mobile/ipad or equal) through that service. That will bring a notification like Apple/FB/Insta use upfront of the device. In the notification message you can send a link that opens up FileMaker Go and give users more information
Retrieving data ...