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

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

Re: Selecting columns from array

Hi @Fotord,

 

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

3 REPLIES 3
Community Support
Community Support

Re: Selecting columns from array

Hi @Fotord,

 

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

Fotord
Frequent Visitor

Re: Selecting columns from array

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

alu3233
Frequent Visitor

Re: Selecting columns from array

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. 

Helpful resources

Announcements
firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!

firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

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

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Users online (7,405)