I inherited a power app at my work. I've never worked with power apps until now. We use it to perform safety audits on jobsites and notify people of hazards we find. We also use it to notify people of positive observations of safety.
The problem is that when we click our button to "save and send email to assignee" even if it is a positive observation it sends an email stating that there is an open hazard. (current code posted below) Is there a way to make it if (observation type="positive observation") then send email "There has been a positive safety observation on your jobsite."
SubmitForm(Form1) & Office365.SendEmail(Form1.LastSubmit.AssignedTo.Email, "You have been assigned a hazard item",
"Project Name: " & Form1.LastSubmit.Title & "
Review Date: " & Form1.LastSubmit.Review_x0020_Date & "
Hazard Description: " & Form1.LastSubmit.Description & "
Location: " & Form1.LastSubmit.Location & "
Corrective Actions: " & Form1.LastSubmit.Corrective_x0020_Action & "
Current Status: " & If(Form1.LastSubmit.Corrected = true, "Corrected", "Not Corrected") & "
" & "To view attached pictures and correct the item, follow this link: " & Form1.LastSubmit.'{Link}' & "