I have an application that sends a push notification to the user's coordinator whenever they submit a travel request. It seems to work just fine about 90% of the time, but at certain times people are getting error messages during the attempted submission of the push notification. The error message makes it seem like there is an issue pulling the name and email information, but I haven't been able to identify a trend or a root cause for the error yet.
Here is the relevant section of code from the OnSelect function of my button.
PowerAppsNotification.SendPushNotification( { recipients: [First(Filter(Coordinators, Coordinators.DisplayName = Dropdown2.Selected.Value)).Email], message: User().FullName & " has submitted a travel notification.", openApp: true } )
I'll be happy to provide any other details that might help pinpoint the issue.
Hi @jbarkerag,
Could you please share more details about the Coordinators data source mentioned within your formula?
Please take a try to modify your formula as below:
PowerAppsNotification.SendPushNotification( { recipients: [LookUp(Coordinators, DisplayName = Dropdown2.Selected.Value, Email)], /* <-- Modify formula here */ message: User().FullName & " has submitted a travel notification.", openApp: true } )
then check if the issue is solved.
In addition, please also consider take a try to remove the PowerApps Notification connection from your app, then re-add a new PowerApps Notification connection within your app, try your app again to check if the issue is solved.
If the issue still exists, please consider turn off/disable the "Improved app rendering (final validation)" option within Advanced settings of App settings of your app or re-create your app, then check if the issue has been fixed.
Best regards,
Kris
Thanks for the quick response @v-xida-msft.
The Coordinators data source is a SharePoint List that just has two columns [Coordinators, Email]. Within the app, the user has the ability to select a Coordinator name from a dropdown box. The code is just looking up the selected name in the list and grabbing the associated email address to use for the recipients clause of the SendPushNotification function.
I'll try swapping out the Filter for a Lookup, and then I'll have my users test out the functionality again. If I'm still seeing issues, I'll try the other methods you suggested. Hopefully we can pinpoint the underlying issue after some trial and error.
Hi @jbarkerag thank you for creating this thread. Have you had any luck with the new methods?
User | Count |
---|---|
136 | |
133 | |
78 | |
72 | |
69 |
User | Count |
---|---|
222 | |
136 | |
78 | |
60 | |
54 |