cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ChristyQV
Level: Powered On

Referencing a value as part of an HTML table

I have a Flow that creates an HTML table to of multiple SharePoint lists items to send to the person assigned to the items.  It loops through the unique assignees to create one email per person.  Which is working like a charm thanks to this Forum!

html_table.png

My issue is in the HTML table - the reference to the Facility Name, which is a look up field. The "Facility _x0200_Name" returns the following in my email, when all I really want is the text after "Value:".html_output.PNG

 

 I've seen using any variable to access the value, but I'm not sure how to implement in this scenario.  Any guidance is appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Referencing a value as part of an HTML table

Hi @ChristyQV,

 

If you reference "Facility _x0200_Name", it will return all the information contained in the current Facility Name, including id, value.

Since it is an object, you could use the property name directly to get the corresponding property value.

Try using Expression to get the property value in Value.

item()['Facility_x0200_Name']['Value']

Image reference:

17.PNG

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

9 REPLIES 9
WDRC
Level 8

Re: Referencing a value as part of an HTML table

@ChristyQV

 

I am no expert but I think you need some form of Pass Json to get rid of all the other stuff you do not need, I understand what this is trying to achieve but have not been able to get it work.

Andrew

 

 

Super User
Super User

Re: Referencing a value as part of an HTML table

Hi @ChristyQV

So that I can try to reproduce this, what is your Filter Array action doing? 

If I create an HTML table based on the output straight from Get Items from a SharePoint list, the column which is a Lookup is available as dynamic content to the HTML table as ColumnName Value (among others), so in the HTML I get just the value.

In the screenshot below, my SharePoint lookup column is called LookupClient. This is what's available as Dynamic Content to the Value column of the Create HTML Table action, so I selected LookupClient Value to prevent the oData content appearing in the HTML table.

 

Lookup column dynamic content.png

 

But perhaps it's different depending on what your Filter Array is doing...?

 

 

 

 

 

- Sandy

 



Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!


Community Support Team
Community Support Team

Re: Referencing a value as part of an HTML table

Hi @ChristyQV,

 

If you reference "Facility _x0200_Name", it will return all the information contained in the current Facility Name, including id, value.

Since it is an object, you could use the property name directly to get the corresponding property value.

Try using Expression to get the property value in Value.

item()['Facility_x0200_Name']['Value']

Image reference:

17.PNG

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

ChristyQV
Level: Powered On

Re: Referencing a value as part of an HTML table

Thanks Barry,  I think this is on the right track, I put that in, but I got an error per below - it says the field doesn't exist, but then the error lists the name. 

 

html error.PNG

ChristyQV
Level: Powered On

Re: Referencing a value as part of an HTML table

Hi Sandy,

 

Thanks for the help Sandy!  Here is the Filter Array.  If I use the Dynamic Content to pick the Value, then Flow automatically puts another Apply to Each around the Create HTML then I get one email per item instead of one email per email address in the "Email List Distribution",  using the expressions was the only way I could find to not get the Apply to Each around the Create HTML.  (Email List Distribution is a unique list of emails from the original get items; I am sending one email to each user with a list of overdue items.)

  filter array.PNG

WDRC
Level 8

Re: Referencing a value as part of an HTML table

@v-bacao-msftand @SandyU,

 

Thanks for the expression above it worked treat for my "@odata" issue and I now have another which reads as follows:

<div class="ExternalClass3C59539E9F444151B585023110BF7CC6"><p>Talk about some job in </p><p><br></p><p><span id="ms-rterangecursor-start"></span><span id="ms-rterangecursor-end"></span><br></p></div>

I want to get the above down to:

Talk about some job in  

I think I am going to have to split the above before I then use something in the create CSV table, that is why I tried to use PASS Json as stated above but could not get any successful runs to work that way.  I was wondering if I have to use the following to provide me with the correct Json.

https://powerusers.microsoft.com/t5/Building-Flows/Converting-a-CSV-file-to-JSON/m-p/209999#M22134

Any help would be gratefully received.

Regards,

 

Andrew

WDRC
Level 8

Re: Referencing a value as part of an HTML table

@v-bacao-msftand @SandyU,

Managed to get around the above for now by changing the notes field to plain text as below: 

https://powerusers.microsoft.com/t5/Building-Flows/Update-file-properties-adds-DIV-class/m-p/188785

However it would be good to know how to do the above in Rich Text.

Regards,

 

Andrew

 

ChristyQV
Level: Powered On

Re: Referencing a value as part of an HTML table

I got this to work with your syntax; not sure why it didn't work yesterday.  Thank you for your help!

Community Support Team
Community Support Team

Re: Referencing a value as part of an HTML table

Hi @ChristyQV,

 

Actually it should be:

item()['Facility_x0020_Name']['Value']

It seems that you have modified it yourself, so it work.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
firstImage

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Solution Authors
Top Kudoed Authors
Users online (4,787)