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 / Key Value in Get a row?
Power Automate
Unanswered

Key Value in Get a row?

(0) ShareShare
ReportReport
Posted on by

Hi,

I am trying to extract email addresses from an Excel sheet in order to send an email to that address. However I can't figure out what to enter in Key Value. The value changes every time a new row is added (from MS Forms). I keep getting the error: No row was found with Id (and then the value I enter).

 

Anyone has an idea to solve this?

 

Skærmbillede 2024-04-12 kl. 12.58.01.png

Categories:
I have the same question (6)
  • v-mengmli-msft Profile Picture
    on at

    Hi @MP-68 ,

     

    The key value should be a specific value in a column. The column has different values, so we take the column as key column.

    So, you should fill in an email address here to locate a row in the email address column based on this value.

     

    Best regards,

    Rimmon

  • Garethterb1 Profile Picture
    131 on at

    Looks like you might want to rather use the Get rows action as this will return all the rows, for the connector that you are using you are targeting a specific row in your table where the key is the unique identifier.

     

  • CU05080624-2 Profile Picture
    on at

    This is what my flow looks like and the options I have.

    Skærmbillede 2024-04-12 kl. 13.32.28.png

  • Garethterb1 Profile Picture
    131 on at

    list rows present in a table

  • v-mengmli-msft Profile Picture
    on at

    Hi @MP-68 ,

     

    "Get a row" is used to get specific row according to key value. If you want to send emails to each email address in Email column, you try "list rows present in a table". Then you can select Email column dynamic content in "To" field of "Send email action".

     

    Best regards,

    Rimmon

  • CU05080624-2 Profile Picture
    on at

    Thank you - this works much better. 🙂  However, when I add the action "Send an email", PA automatically creates a "for each" loop - I only want the last row to be read - and only one email sent.

    Any ideas?

  • Verified answer
    v-mengmli-msft Profile Picture
    on at

    Hi @MP-68 ,

     

    Please try this.

    Step1.Recreate the Send email action.

    Step2.Insert below expression in "To" field.

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

     

    ——————————————————————————————————————————————————

    If my answer helps you solve the problem, please accept it as a solution.

     

    Best regards,

    Rimmon

  • Garethterb1 Profile Picture
    131 on at

    Ok, the reason that it creates a for each is that the result is an array with many rows. The way to stop this is to specify  which record you want to return by using an index number [0] eg 

    outputs('List_rows_present_in_a_table')?['body/value'][0]['email'] will return the first row and the value stored in column email. If your table is not always the same number of rows there are a few methods that you can use to set the index value but in your case if you are always targeting the last row you can use the last() function like this last(outputs('List_rows_present_in_a_table')?['body/value'])['email']

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