web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Pulling select rows fr...
Power Automate
Unanswered

Pulling select rows from an excel table

(0) ShareShare
ReportReport
Posted on by 84

Trying to set up a flow that pulls certain rows from a table based on certain criteria, and emails only those rows to a particular email recipient. At this point I'm struggling with the syntax in the filter array. The two fields in the table I want to evaluate are '@[Date]' - when that is set to 'Complete' - and '@[Amount]' - when that is not blank. If those criteria are met, then I would like to send an email that include those two fields, plus two additional fields, to a specific recipient. Is that possible?

 

Capture.JPG

Categories:
  • v-bacao-msft Profile Picture
    Microsoft Employee on at

    Hi @mterry,

     

    I have made a test on my side and the flow works well. Please take a try with the following workaround:

    For testing, I created a Table with four columns, and the last column is automatically generated, do not worry:

    20.PNG

    Use Get rows to select the corresponding Table and configure the Filter array to filter the rows that meet the criteria.

    Expression:

    @and(not(empty(item()?['Amount'])),equals(item()?['Date'], 'Complete'))

    You could modify the expression based on the specifics of your column. If you don't know what the name of the column is, you could first output Get rows to get the column name.

    If the column name contains spaces, the names that may be displayed are not the same. This is something to be aware of.

    21.PNG

    Use Select to select the corresponding column, the value filled in the Select-value is edited in the Expression, and then create the Html table as the body of the Email.

    22.PNG

    Please take a try and feel free let me know if you have any issue.

     

    Best Regards,

    Barry

  • mterry Profile Picture
    84 on at

    I'm getting an error at the get rows step. It's a BadRequest error. I changed from File Identifier to the actual file name and still getting an error. I would like for the file name to by dynamic in this step - the date is typically used in the file name that I'm pulling from and I'd like to keep that. 

  • v-bacao-msft Profile Picture
    Microsoft Employee on at

    Hi @mterry,

     

    First of all, you only provide a screenshot of a part of the Flow configuration. I don't know which actions are configured in front of Get rows action.

    I just provided an example of how to manipulate the data in the Table.

    Provide a full screenshot of your Flow configuration so I would provide a proper workaround.

     

    Edit:

    Please provide more details.

     

    Regards,

    Barry

  • mterry Profile Picture
    84 on at

    Fair enough, here's the full picture. I actually set up two separate flows for what I'm trying to accomplish, but perhaps there's a better way. 

     

    Flow 1:

    When a new email comes in with an attachment it searches for a string in the name, and when the attachment name contains that string, it saves that file to a OneDrive for business folder and deletes the existing file. This portion has been working succesfully thus far. 

    flow1snip1.JPGflow1snip2.JPG

     

    Then Flow 2:

    When a new file is created in that folder (I assume that deleting the old file and saving a new one falls under the create file trigger), it goes through that excel file, pulls the data as noted before and sends out an email with the pertinent information. 

     

    flow2snip1.JPGflow2snip2.JPG

     

    The file name will be changing, so would like to have that be dynamic. Thanks in advance for your help. 

  • mterry Profile Picture
    84 on at

    Just wanted to bump this up and see if anyone can assist?

  • mterry Profile Picture
    84 on at

    Bump again 

  • v-bacao-msft Profile Picture
    Microsoft Employee on at

    Hi @mterry,

     

    Sorry for my late reply.

    Do you mean that the Get rows-File name configured in Flow2 uses the Dynamic content output from the trigger?

    If the name of each of your tables is the same, you may be able to edit the File name field directly.

    Enter the folder where the file is located and add the name of the file. Then configure the table name.

    The problem with this configuration is that you can't get the information of the column in Excel Table, because File name is not sure, so you need to configure the relevant column information yourself.

     

    Best Regards,

    Barry

  • mterry Profile Picture
    84 on at

    Hey no worries, thanks for getting back to me. 

     

    The file name that I want to pull the rows from in Flow 2 will be changing each time (it's the file name, and then the date, so the date will change every time it's saved to OneDrive). However, the table name won't be changing, it will remain the same. 

  • mterry Profile Picture
    84 on at

    But even when I input the file name to test the Flow (using the file that's currently saved there), I am still getting an error, so not sure what I'm doing. The error is saying it can't read the metadata from the file. 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 317 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 247

#3
Henil Profile Picture

Henil 117

Last 30 days Overall leaderboard