cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
BonnieStar
Helper I
Helper I

How retrieve Compose output to insert into HTML table?

I've worked on this for days and still can't seem to figure this out..  I have a flow that gets the properties from files in a SharePoint document library. I then have certain columns (metadata) inserted into an html table within an email.  For my one calculated column ("Aging (Days)"), I first use two Compose actions within an Apply to Each to remove the decimal places and trailing zeroes.  What I can't seem to figure out is how do I now collect the resulting output from the Compose to include in my html table?  When I test the flow, I can see that the output is correct, so now how do I get it in the html table?

 

I wish it was as simple as inserting "outputs('Composeint')" into the table....

 

screenshot 1.pngscreenshot 2.png

1 ACCEPTED SOLUTION

Accepted Solutions
fchopo
Super User
Super User

Sorry, I made a mistake on the expression. It should be the following:

Int(if(empty(item()? ['Aging (Days)']), '0',item()?['Aging (Days)'])

Hope it helps now.

Ferran 

Did I answer your question? Please consider to mark my post as a solution to help others.
Proud to be a Flownaut!

View solution in original post

8 REPLIES 8
fchopo
Super User
Super User

Hi @BonnieStar 

You could delete the "apply to each" action, and in the Days_Awaiting_Approval column (create HTML table) use the following expression:

int(empty(item()['Aging (Days)'],'0'))

1) Check whether 'Aging (Days)' column is null or not (if it is, then use '0').

2) Convert value to integer.

 

Hope it helps!

Ferran

Did I answer your question? Please consider to mark my post as a solution to help others.
Proud to be a Flownaut!
BonnieStar
Helper I
Helper I

Unfortunately, my column "Aging (Days)" is not available to select under Dynamic Content.  Only two choices are "body" and "value."

 

screenshot 3.png

fchopo
Super User
Super User

Hi @BonnieStar 

Please, write the expression using the "Expression" tab, and not in the "Dynamic content" one.

Hope it helps!

Ferran

Did I answer your question? Please consider to mark my post as a solution to help others.
Proud to be a Flownaut!

screenshot 4.png

BonnieStar
Helper I
Helper I

I replaced ['Aging (Days)'] with ['Aging_x0020__x0028_Days_x0029_'], but then got this error:

screenshot 5.png

BonnieStar
Helper I
Helper I

Here's what I currently have:

screenshot 6.png

fchopo
Super User
Super User

Sorry, I made a mistake on the expression. It should be the following:

Int(if(empty(item()? ['Aging (Days)']), '0',item()?['Aging (Days)'])

Hope it helps now.

Ferran 

Did I answer your question? Please consider to mark my post as a solution to help others.
Proud to be a Flownaut!
BonnieStar
Helper I
Helper I

I'm blown away.  That worked!!  FINALLY!!!!!!!!!!!  Thank you infinitely!

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (1,794)