I’m trying to play around with the MyAlerts! plugin by @ZeroqodeSupport and I’d like to know if it is possible to kick off an alert for more than just the current user?
For example, I have a two market place tech support app. I’d like for customers and freelancers to both receive an alert whenever an open ticket that they’ve either submitted or that they are assigned to is updated with a new message or closed.
Is something like this possible with this alert plugin?
Unfortunately this solution doesnt quite work the way I’d like it to. It only seems to trigger one time and never again after that unless I close the browser and restart. However, for the first time it did have the intended affect of letting the receiving user be alerted that one of their tickets has a new message.
I will continue to play around with this expression and find a way to get it so that the alert shows up for the receiving user every time. If you have any more pointers, please let me know.
I’m not sure if my objective is the same as @randreas but it sounds similar. I’m looking for a way for one user to trigger an alert to a different user. Basically a messaging system.
@ZeroqodeSupport’s response - if I understand it correctly - shows how you might add a filter to determine in what circumstances the alert would show, but it doesn’t explain how the trigger process would work. How does an app know to show an alert to a user if they have not hit a button for example?
A Search for always returns a list - in this case, a list of booleans (yes/no data type). Even if there’s only 1 item in the list, it must be referenced explicitly. In this case, :first item refers to the first item in the list.
I get that. Sorry, this is so hard to explain in text.
My understanding is that an ‘only when’ expression needs to be boolean, so that it will trigger when true and not trigger when false.
in your screenshot, it looks to me like the expression is returning the first Message where the messageNew field is “Yes”. I don’t get how that gives a boolean result. Surely that results in a message not a true/false.
I would understand it if it was Search for Messagess’:first item’s messageNew is “yes”, assuming that messageNew was a yes/no field.
Would you be able to help me understand the difference, or am I completely misunderstanding?
Once again, I know this is bubble logic, not directly related to the plugin, but if I can work this out it will solve what I’ve been trying to do for weeks.
I have not yet used the database change triggers but my understanding is that when data in the database changes you can set conditional logic to trigger a workflow. If that is the case then the following idea and logic should work to accomplish the goals set out by @gavin1 and @randreas
When there is a new message created, in the same workflow that you are creating the new message, create a event to send the alert with conditional logic set so it fires if the intended recipient is logged in.
On the user data type you should create a data field of boolean (yes/no) which will change from no to yes when they log in, and yes to no when they log out. Please note, this is not to check if they are logged in or not for the part 1…that is built into bubble by doing “current user is logged in” (however, your conditional will need to check based on message recipient and not current user). This part is to set up a workflow to trigger based on a database change.
Because if the user is not logged in for part 1 to occur, you need to send the message the next time they do log in, which is why you need the user data type to have the yes/no field for when they login and log out.
So the next time they login the field will change from no to yes, which you should use to trigger the workflow based on database change. That way the moment they log in the workflows are triggered and the alerts are sent.
I have not tested this, but it should work if you set up your conditionals correctly. I will try to remember to implement this idea in an app tomorrow and report if it works or not, but give it a try regardless of my reply or lack of.