Hi @wht_629 ,
Do you want to send a Push Notification after you submit an new record into your SP List?
Firstly, if you want to submit a new record into your SP List, you should modify your Patch formula as below:
Patch(
EquipmentServiceRequest,
Defaults(EquipmentServiceRequest), // Modify formula here
{
LineNo: txtLineNo_Edit.Text,
EquipmentNo: txtEquipment_Edit.Text,
ToolingNo: txtToolingNo_Edit.Text,
FaultDescription: txtFaultDesc_Edit.Text
}
);
the Patch formula that you provided is used to update an existing record in your SP List, rather than, create a new entry in your SP List. You should make your whole formula look like below:
Set(
SubmittedRecord,
Patch(
EquipmentServiceRequest,
Defaults(EquipmentServiceRequest), // Modify formula here
{
LineNo: txtLineNo_Edit.Text,
EquipmentNo: txtEquipment_Edit.Text,
ToolingNo: txtToolingNo_Edit.Text,
FaultDescription: txtFaultDesc_Edit.Text
}
)
);
If(
!IsBlank(SubmittedRecord),
PowerAppsNotification.SendPushNotification(
{
recipients: ["myName@xxx.com"],
message: "New Request has been assigned to you",
openApp: true
}
)
)
For your first question, if you want to send a Push Notification from a canvas app, please check the following article:
https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/add-notifications
For your second question, in order to submit a new record back to your SP List, the SubmitForm function and Patch function are both OK. If you use SubmitForm function, you must add a Edit form in your canvas app, then connect it to your SP List.
For your third question, please check the article I mentioned within the response to your first question.
The important thing you need to know is that the PowerAppsNotification connector is a action data source rather than table data source, so you could not connect it to a Edit form directly, you need to execute the following formula (inside On-behavior event property of a control) to send Push Notification:
PowerAppsNotification.SendPushNotification(...)
Regarding the need that you mentioned, I think the PowerAppsNotification connector may not be the best choice for your scenario. Currently, there are known limits with the PowerAppsNotification connector:
https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/add-notifications#known-limitations
As an alternative solution, you could consider add a Microsoft 365 Outlook connector in your canvas app to send Outlook email to your recipients.
Set(
SubmittedRecord,
Patch(
EquipmentServiceRequest,
Defaults(EquipmentServiceRequest), // Modify formula here
{
LineNo: txtLineNo_Edit.Text,
EquipmentNo: txtEquipment_Edit.Text,
ToolingNo: txtToolingNo_Edit.Text,
FaultDescription: txtFaultDesc_Edit.Text
}
)
);
If(
!IsBlank(SubmittedRecord),
Microsoft365Outlook.SendEmail(
"myName@xxx.com", // if want to send to multiple users, please concatenate multiple email addresses with ';' operator, e.g. User1@email.com;User2@email.com;..
"New Request has been assigned to you",
"New Request has been assigned to you"
)
)
Please try above solution, then check if the issue is solved.
Regards,