cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

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
Highlighted
Community Support
Community Support

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
Highlighted
Helper V
Helper V

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

 

 

Highlighted
MVP

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

 

Sandy
@SandyU



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

Proud to be a Flownaut!


Highlighted
Community Support
Community Support

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

Highlighted
Frequent Visitor

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

Highlighted
Frequent Visitor

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

Highlighted
Helper V
Helper V

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

Highlighted
Helper V
Helper V

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

 

Highlighted
Frequent Visitor

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!

Highlighted
Community Support
Community Support

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Upcoming Events

Experience what’s next for Power Automate

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Top Solution Authors
Top Kudoed Authors
Users online (6,615)