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

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

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

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
Level: Powered On

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

Highlighted
alu3233
Level: Powered On

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

Power Platform Online Conference

Speakers, submit your sessions now! Call for speakers ends Feb. 10!

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!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

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 (Last 30 Days)
Users online (3,991)