Hi All,
I am trying a flow which send email to the respective Managers when flow is triggered from button click in PowerApps. I am passing the managers names in a array and collecting the managers project details from SharePoint with variables. When appending the value with HTML table I have condition to satisfy only then the mail will be sent to the respective manager with their details. My code is
<tr>
<td >@{items('Apply_to_each_4')['ProjectName']}</td>
<td >@{items('Apply_to_each_4')['AccountName']}</td>
<td >@{items('Apply_to_each_4')['DM Name']}</td>
<?php @{if(equals(items('Apply_to_each_4')?['ProjectType'],'Dev-Enh_Upgr-Impl'),equals(items('Apply_to_each_4')?['ProjectMethod'],'Traditional Development'),
equals(items('Apply_to_each_4')?['Projectcontract'],'T & M'))}{?>
<?php elseif @{if(equals(items('Apply_to_each_4')?['Projectcontract'],'FP'),equals(items('Apply_to_each_4')?['ProjectMethod'],'Traditional Development'),
equals(items('Apply_to_each_4')?['Projectcontract'],'FP'))}{?>
<?php elseif @{if(equals(items('Apply_to_each_4')?['ProjectType'],'Dev-Enh_Upgr-Impl'),startsWith(items('Apply_to_each_4')?['ProjectMethod'],'Agile'),
startsWith(items('Apply_to_each_4')?['Projectcontract'],'T & M'))}{?>
<?php else @{if(equals(items('Apply_to_each_4')?['ProjectType'],'Maint-Supp-IMS'),equals(items('Apply_to_each_4')?['ProjectMethod'],'Agile Maintenance'),
equals(items('Apply_to_each_4')?['Projectcontract'],'FP'))}{?>
<td style="background-color:@{if(equals(items('Apply_to_each_4')?['Schedule'],'Red'),'Red',
if(equals(items('Apply_to_each_4')?['Schedule'],'Amber'),'Orange',
if(equals(items('Apply_to_each_4')?['Schedule'],'Green'),'Green','')))};" style="background-color:@{if(equals(items('Apply_to_each_4')?['Schedule'],'Red'),'Red',
if(equals(items('Apply_to_each_4')?['Schedule'],'Amber'),'Orange',
if(equals(items('Apply_to_each_4')?['Schedule'],'Green'),'Green','')))};" style="background-color:@{if(equals(items('Apply_to_each_4')?['Commitment'],'Red'),'Red',
if(equals(items('Apply_to_each_4')?['Commitment'],'Amber'),'Orange',
if(equals(items('Apply_to_each_4')?['Commitment'],'Green'),'Green','')))};" style="background-color:@{if(equals(items('Apply_to_each_4')?['On time'],'Red'),'Red',
if(equals(items('Apply_to_each_4')?['On time'],'Amber'),'Orange',
if(equals(items('Apply_to_each_4')?['On time'],'Green'),'Green','')))};" >@{items('Apply_to_each_4')['Schedule']}@{items('Apply_to_each_4')['Schedule']}@{items('Apply_to_each_4')['Commitment']}@{items('Apply_to_each_4')['On time']}</td>
<?php}?>
<?php}?>
<?php} ?>
<?php} ?>
</tr>
Here I have combined with Php to check the condition. Based on Project method and contract type the condition satisfices:
For each project only one condition will will be true. When Project Methodology is Traditional and contract type is (T&M or FP) then it must take onbly schedule column value. But in my case since I have used only one td for all values even though the condition is false also two values get displayed in mail. I have attached screenshot for the same.
Any help or suggestions on this..