Hi,
I'm having trouble building the list of recipients for a PowerAppsNotification action. If I add them manually in like this -
PowerAppsNotification.SendPushNotification(
{
recipients:["email.address@example.com","email.address2@exmaple.com"],
message: "This is a test message",
params: Table({key: "NotificationTripID", value: editItem.ID}),
openApp: true
}
)
This works fine. If I use "set" to assign it via variables this works as well -
Set(TripLeaderEmail,editItem.'Trip Leader'.Email);
Set(TripMemberEmails, Concat(editItem.'Trip Members', Email, ","));
Set(TripExpertEmail, editItem.'Trip Expert'.Email);
PowerAppsNotification.SendPushNotification(
{
recipients:[TripLeaderEmail,TripExpertEmail,TripMemberEmails],
message: "This is a test message",
params: Table({key: "NotificationTripID", value: editItem.ID}),
openApp: true
}
)
However, if I try and add all 2 or 3 variables as a string like
Set(TripLeaderEmail,editItem.'Trip Leader'.Email);
Set(TripExpertEmail, editItem.'Trip Expert'.Email);
Set(NotificationList, TripLeaderEmail & "," & TripExpertEmail);
PowerAppsNotification.SendPushNotification(
{
recipients:[NotificationList],
message: "This is a test message",
params: Table({key: "NotificationTripID", value: editItem.ID}),
openApp: true
}
)
I receive the following error
"code": "InvalidPrincipalIdOrMail",
"message": "The recipient 'email.address@example.com,email.address2@example.com' is not a recognized email address or object identifier in the directory."
If I try and add a char(34) to it like so
Set(NotificationList, Char(34) & TripLeaderEmail & Char(34) & "," & Char(34) & TripExpertEmail & Char(34));
PowerAppsNotification.SendPushNotification(
{
recipients:[NotificationList],
message: "This is a test message",
params: Table({key: "NotificationTripID", value: editItem.ID}),
openApp: true
}
)
I receive the following error
"code": "InvalidPrincipalIdOrMail",
"message": "The recipient '\"email.address@example.com\",\"email.address2@example.com\"' is not a recognized email address or object identifier in the directory."
How can I build the "NotificationList" variable such that it can be used in the PowerAppsNotification command?
Thanks!
Dylan