cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Selecting columns from array

tldnr: How to remove "columns" from an array?

Background:
I have made a simple (but beautiful) maintenance system-application in PowerApps with data in a Sharepoint list. To spare my colleagues from opening an app every day I would like a weekly Email with things to be done in the next 7 days. 

 

Problem:
Everything works fine apart from that I do not want the ENTIRE list to be sent in the email, only the Title and some other information. 

 

Current steps:

  1. Recurrence – The trigger works fine. Every Monday@7:00
  2. Get items –The "Filter Query" does not seem to work on calculated fields so I pull the entire list.

  3. Filter array – This is where I filter the "Get items"-result so that I only get the rows that I am interested in. This works fine on the calculated Boolean columns that tells me if a row is to be shown or not.
    Now I only have 2 of 65 rows left which i am interested in right now. 
     
  4. Create HTML table – Here I can choose from the “Filter array”-body or the “Get items”-value. I choose the “Filter array”-body to only get the 2 rows.

  5. Send an email (V2) – The email-function works fine but the array contains everything. I would like to narrow it down to two or three columns so i do not get that 3 meter wide email.  

 

I guess that this is a really easy problem to solve but i am missing some steps. Probably before or after #4. 

1 ACCEPTED SOLUTION

Accepted Solutions
v-yuazh-msft
Community Support
Community Support

Hi @Anonymous,

 

You could add a "Select" before the "Create HTML table" action as screenshot below:

Capture.PNG

 

The expression of Title in the Select as below:

item()?['Title']

The expression of Office Location in the Select as below:

item()?['Office_x0020_Location']

The flow would run successfully as below:

Capture.PNG

 

Best regards,

Alice

View solution in original post

4 REPLIES 4
v-yuazh-msft
Community Support
Community Support

Hi @Anonymous,

 

You could add a "Select" before the "Create HTML table" action as screenshot below:

Capture.PNG

 

The expression of Title in the Select as below:

item()?['Title']

The expression of Office Location in the Select as below:

item()?['Office_x0020_Location']

The flow would run successfully as below:

Capture.PNG

 

Best regards,

Alice

Anonymous
Not applicable

Works like a charm! Thank you @v-yuazh-msft!

Just to sum things up. 
I got tired of the ugly HTML-table that was created so i changed from "send an email V2" to "Send an email" and added some HTML-code i stole from w3schools.com. 
Looks good enough now. 
Just do not forget to open up the Advanced options, scroll to the end and set "Is HTML" to "Yes". 
Over and out!

 

2019-01-10 22_09_27-Window.png

Anonymous
Not applicable

This technique does not always work. I tried this with Sharepoint document Library as the source, filtered, and select columns. It worked on some, but it does not help me extract the important parts. I cannot select Hyperlinks for the file (item()?['Link'] ) and Filenames with extension ( item()?['FilnameWithExtension'] ) making this completely useless to me. I have a spreadsheet on my email but no link to the files. 

Thank you for this solution, I have a Share Point list of all employees and when their birthday's are. I created a calculated column in SP as a trigger to ensure we are notified the working day before their birthday.

 

I was struggling to create an HTML list in an email to show who's birthdays will be on the next day instead of sending out individual e-mails for each employee.

 

Your solution here worked perfectly the first time - thank you!!!

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.

Users online (4,687)