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
 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

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

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (3,876)