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 / Create html tables bas...
Power Automate
Suggested Answer

Create html tables based on true/false

(1) ShareShare
ReportReport
Posted on by 8
I need to create 2 tables - one for true results, one for false results. Is there a way to do this with an output of html table? My intention is to put each table into a word document. Not sure if there is an IF statement option, or if I can use variables in Power Automate to create these html tables. Data is in SharePoint, so the categories are per record, so they are going across - each record is a row. I am using Get Items to get the particular record. Appreciate any insight - here is my sample data and required output in two tables. Thank you.
 
Categories:
I have the same question (0)
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,433 Super User 2025 Season 2 on at
    Hi,
     
    Sorry I get confused easily. I do not follow what I am looking at versus what you want.
     
    You have 1-M rows.
    Each row has 1-M columns
    Each column value is either True or False
     
    You want an HTML Table that has.. I guess, the 5 Colors as Columns and then for each row, put false in for all the false rows.
    if its true, put true in, but in another table
     
    So you would need to separate Arrays.
     
    now depending on how you did this the easy way would be
     
    Create Both arrays with a starting point of
    ["Blue", "Red", "Yellow", "Orange'. "Green"]
     
    Now you would loop through your Records (I have no idea where your data is so I cannot tell you how)
     
    For each Row, you would do an Append to Array 2 times.
    In the first one you would something like this
     
    ["","","","",""]
     
    Now inbetween the "" double quotes, you would add an expression.
    The expression would do something like (and you would do it PER append array because one is for True and one is for False
    So lets pretend it the True array
     
    if(equals(thiscolumnofthiscurrentrow, "True", "True")
     
    it would look like this in total
     
    ["if(equals(thiscolumnofthiscurrentrow, "True", "True")","if(equals(thiscolumnofthiscurrentrow, "True", "True")","if(equals(thiscolumnofthiscurrentrow, "True", "True")","if(equals(thiscolumnofthiscurrentrow, "True", "True")","if(equals(thiscolumnofthiscurrentrow, "True", "True")"]
     
     
    Where each space between the "" would be the expression, and the change is the Column, remember it ONLY writes the string True if the current value IS True else it writes nothing
     
    You would the exact same for the false array
     
    When you are done looping, you now have 2 arrays
    1 with all the row columns marked as True or nothing
    and 1 with all the row columns marked as False or nothing
     
    Now you can use the Create HTML Table action (twice)
    to create Tables from the arrays, and each only shows False and or True but not mixed.
     
     
     
  • Suggested answer
    Robby_WW Profile Picture
    115 on at
    Hey,
     
    Your data comes from sharepoint? Then is this not possible?
    and then do it again but with "false".
     
     

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