Background: Multi screen, multi form app, confirm accuracy screen, final submit button.
Expectation: Final submit button creates an email with all the listed fields to be sent to the app user and their manager.
Current reality: Error showing on button but no suggestions as to how to fix. Ran with an outside user today and couldn't get to final submission review screen. I don't what parameters it is requesting for the email as I have tried the suggested format and several others with no success.
Here's the code for final submit of OnSuccess:
If(
IsEmpty(Errors('Incident Investigation Tracker')),
IncidentNotificationResponse.Run(Office365Outlook.SendEmail(to: "" & ()User.email),Office365Outlook.SendEmail(subject: "Incident Notification"),
NotificationType.Success
);
Navigate('48hr');
Notify(
First(Errors('Incident Investigation Tracker')).Message,
NotificationType.Error
)
I've been working on this app for six weeks and can't seem to get beyond this point.
From here I want the information to auto generate a form in a sharepoint list from the info entered in the app.
Hi @CBlasius ,
The $ is actually a string interpolation operator that is key to making this work, so don't delete it.
Instead, focus on making the formulas in the the curly braces work which is what I was referring to when I mentioned making corrections for wrong column names and types.
First, make sure all column names are correct. After that, if you still have errors, you need to select the columns of any complex column types (Choice, LookUp, Person, etc.).
This definitely created an email with the removal of the $ and updating the URL. On with my debugging process! Thank you!
Hi @CBlasius ,
Personally I'd go with the option to send the mail directly from the app which should look something like this:
If(
IsEmpty(Errors('Incident Investigation Tracker')),
Office365Outlook.SendEmailV2(
User().Email,
$"Incident Notification: {Self.LastSubmit.Title} {Self.LastSubmit.ReportType}",
$"Thank you for submitting your notification, please see below: <br>
Incident Title: {Self.LastSubmit.Title} <br>
Report Type: {Self.LastSubmit.ReportType} <br>
Track Owner: {Self.LastSubmit.TrackOwner} <br>
Department: {Self.LastSubmit.Department} <br>
Type of On-Track equipment involved: {Self.LastSubmit.OTE} <br>
City: {Self.LastSubmit.City} <br>
State: {Self.LastSubmit.State} <br>
Milepost: {Self.LastSubmit.Milepost} <br>
Incident Narrative: {Self.LastSubmit.Narrative} <br>
<br>
This notification has initiated an NPRC 7000 form associated with this incident. Your NPRC 7000 form may be missing data if it was not available when you started this app.<br>
<br>
For more documents, please visit the <a href=""URL1"">Safety Incident Investigation</a> page by <a href=""URL1"">Clicking here</a>."
);
Notify(
"Your incident was succesfully reported",
NotificationType.Success
),
Navigate('48hr');
Notify(
First(Errors('Incident Investigation Tracker')).Message,
NotificationType.Error
)
)
In the above you'll need to probably still make some corrections as column names and types don't match. Also you need to replace URL1 with the actual link of the Safety Incident Investigation page.
HI @CBlasius , You have 6 input parameter for your flow. I would suggest to check this video: https://www.youtube.com/watch?v=teJgN9QjBwM
------------------------------------------------------------------------------------------------------------------------------
I hope this helps.
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs up.
Thanks,
ANB
Here's the email set up:
Hi @CBlasius , As said the input parameter of your flow couldn't be the Office365Outlook.SendEmail(). As the current screenshot, it seems that you require 3 input parameters, so can you please share the screenshot of your Power Automate flow trigger?
OR
Can you confirm that the first parameter of your flow is useremail
2nd parameter is IncidentTitle and 3rd is Report Type?
If yes, then the code should be as follow:
IncidentNotificationResponse.Run(EMAILADDRESOFUSER, INCIDENTTITLE, REPORTTYPE)
These 3 parameter you need to pass in same sequence the way it is declared in PowerApps (V2) trigger.
------------------------------------------------------------------------------------------------------------------------------
I hope this helps.
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs up.
Thanks,
ANB
The app entries are going to a Sharepoint list and limited fields need to go to the original user and their manager. Which way is the best way to configure that?
Thank you for responding so quickly. Like I said, I have tried several different ways to try to get this to work including office as listed, the automate which asked for four fields but I want 11 to show.
Hopefully this is what you were requesting.