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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How to extract values ...
Power Automate
Unanswered

How to extract values from Excel to be used in a Condition Action

(0) ShareShare
ReportReport
Posted on by

I currently have an MS Form that is flowing into an excel spreadsheet with each entry adding a new row into Excel. I have set up some formulas to create a 'Score'. I want to then use this 'Score' as a condition action to automatically trigger a 'Pass' or 'Fail' message in MS Teams. 

 

This is currently the flow i have:

jpalser_0-1605535268066.png

 

However, whenever the flow runs it takes all the entries in the 'Total Score' excel column rather than the most recent entry that has been added from earlier in the flow - as a result I get multiple posts in Teams. I have tried to taking away the 'Apply to Each' but that did not work.

 

Does anyone have any suggestions how to build this with only the latest entry into the table being counted?

 

Thanks!

 

Categories:
I have the same question (0)
  • krootz Profile Picture
    458 on at

    @Anonymous If the score is part of the data being added, you can skip list rows.  If not and the score is calculated in the excel sheet itself, you can use the "Get Row" action instead to fetch that single row that was added. 

  • Community Power Platform Member Profile Picture
    on at

    @krootz okay so instead of the 'List Rows' action, i need to be using 'Get Row' action?

  • Community Power Platform Member Profile Picture
    on at

    @krootz because the 'Total Score' value depends entirely on the results from the form, I cannot set up the 'Get a Row' because I don't know the value to look for within the 'Total Score' column. 

    jpalser_0-1605545890288.png

    Again, this is based on a very basic understanding of Power Automate, so please let me know if i am doing anything wrong!

     

    Thanks!

  • Paulie78 Profile Picture
    8,422 Moderator on at

    Yes, you could simply select the final element of the list rows action based on it's length and you could skip the apply each completely, know what I mean or shall I explain further?

  • Community Power Platform Member Profile Picture
    on at

    @Paulie78 further explanation would be great! As soon as I select the 'Total Score' column as the value for the condition it automatically adds the 'Apply to Each' condition.

    jpalser_0-1605546805902.png

     

  • Paulie78 Profile Picture
    8,422 Moderator on at

    Take a look at this:

    ExcelGetFinalRow.PNG

    Expression is:

    outputs('List_rows_present_in_a_table')?['body/value'][sub(length(outputs('List_rows_present_in_a_table')?['body/value']),1)]

    This will give you a new object which contains only the contents of the final row of your excel table, which you can then extract values from.

  • Paulie78 Profile Picture
    8,422 Moderator on at

    Also, ignore my last expression, it works fine but it is far too complicated, you can simply do:

    last(outputs('List_rows_present_in_a_table')?['body/value'])

    Which produces exactly the same result.

  • Community Power Platform Member Profile Picture
    on at

    @Paulie78 Thanks very much for that much appreciated! That expression gives the content of the whole row, is there a way to use the final cell in that row in the condition action?

     

    Currently the below condition is not working as the two parameters are not matching.

     

    jpalser_0-1605608368641.png

     

  • Verified answer
    Paulie78 Profile Picture
    8,422 Moderator on at

    I actually anticipated your question and made a video for you last night that shows how to get the information you want:

    https://www.youtube.com/watch?v=44yhtLy3CFM&feature=youtu.be

  • Community Power Platform Member Profile Picture
    on at

    Thank you so much for putting that together! Really taught me a lot with what can be done and helped me out massively! Thank you!!

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard