web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Power automate flow co...
Power Apps
Unanswered

Power automate flow condition

(0) ShareShare
ReportReport
Posted on by 559

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..

Screenshot (77).png
Categories:
I have the same question (0)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 541

#2
WarrenBelz Profile Picture

WarrenBelz 434 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 289

Last 30 days Overall leaderboard