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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / if statement in compos...
Power Automate
Unanswered

if statement in compose to build html table

(0) ShareShare
ReportReport
Posted on by 33

Hi,

 

I need to make an if statement that if item()['Key Status'] = 'Checked in', then it will output the code to build the html table for 'Key Location' and 'Equipment Location'. I keep getting an error, there must be something wrong with my syntax.

 

 

if(equals(item()['Key Status'],'Checked in'),'<tr>
<th id='ships'>Key Location</th>
<th style="font-weight: normal">@{items('Apply_to_each')['Key Location']}</th>
</tr>
<tr>')

 

Thanks!

eobrie22_0-1658489056929.png

 

Categories:
I have the same question (0)
  • David- Profile Picture
    1,254 on at

    I am thinking that special characters in your expression to create the HTML is causing the error. Try something basic just to make sure your logic is working such as:

     

    if(equals(item()['Key Status'],'Checked in'),'true', 'false')
     
    If that works, you will probably need to figure out a way to escape out the special characters in the html portion of the expression.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard