Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Answered

Get a row - key value failing to create dynamically

(0) ShareShare
ReportReport
Posted on by 9

Below is my flow and it is failing at the "Get a row" step because the key value is dynamic and not static.  It doesn't recognize my Key Value which I'm dynamically  adding to the table anytime "Add a row into a table" from the previous is run. 

 

sasscocerty_18-1635884920865.png
 
sasscocerty_0-1635892709628.png

 


 

sasscocerty_20-1635884990625.png

Below is what I'm trying to accomplish. 

Forward email received in a shared mail box to individual recipients whose email address are saved in another database

 

Step 1. When mail new email arrives

Step 2: Add a row into a table ==> I created a excel spreadsheet with those column. The "To" field shows as 12345@domain.com. So I used the 'split' function to strip the 12345 from the rest of the email and save that in the 'eeid' column. The 12345 is unique employee number that can be cross reference in another database to find the employee's actual email address.

Step3 : Run Script ==> - I run a office script which is a recorded XLOOKUP to query another worksheet where the user 12345 has their email address saved

Step 4: Get a row ==> Here I'm trying to get the row from my table but it keeps failing because of key value not being static. As you can see from my flow, my key value is set as "id" . I use the xlookup from the previous step to populate a random number into this column.

 

The issue is that I cannot add a static key value to the table in advance because then the "Add a row" from the 2nd step would would fail.

 See error below

sasscocerty_1-1635893514295.png

 

 

 

  • sasscocerty Profile Picture
    9 on at
    Re: Get a row - key value failing to create dynamically

    I actually used the eeid before your next reply came in and that seems to be working. Thanks so much Mira. This great. Perhaps I will get a better and quicker response with split function than the eeid. But THANK YOU !!!!

  • Mira Ghaly Profile Picture
    11,409 Super User 2025 Season 1 on at
    Re: Get a row - key value failing to create dynamically

    @sasscocerty 

    No do not use eeid .. But please using the same split expression you are passing to eeid

     

  • sasscocerty Profile Picture
    9 on at
    Re: Get a row - key value failing to create dynamically

    I have tried this in the past and I got an error saying the data in the eeid cannot be found. But I will try again. Thanks for your thought though

  • Verified answer
    Mira Ghaly Profile Picture
    11,409 Super User 2025 Season 1 on at
    Re: Get a row - key value failing to create dynamically

    @sasscocerty 

    If you just used the eeid as the key column and pass the split expression the same way you are passing it on the Add row this will work.

     

  • sasscocerty Profile Picture
    9 on at
    Re: Get a row - key value failing to create dynamically

    Hello @Mira_Ghaly  Thanks for your response.

     

    "Just to understand you a bit more , does the run script populate this field?"

    Yes, the office script populate this "id" field. 

    This screenshot show the XLOOKUP I used to the column F (email) data 

    sasscocerty_0-1635912427460.png

    And this screenshot show the formula I used to get data in Column G (id).

    sasscocerty_1-1635912731134.png

     

    Also you stated that

    "I believe you need to yes the Key Column as the eeid because the id is not yet there on the and you are trying to reference it from the Add Row Action"

     

    I think you're right on this one, probably that's why it is returning null data when I reference it. I have to research a little bit more on how to "yes'  the key column or confirm this data. Do I need to "yes" the key value too ?

  • Mira Ghaly Profile Picture
    11,409 Super User 2025 Season 1 on at
    Re: Get a row - key value failing to create dynamically

    @sasscocerty 

    Just to understand you a bit more , does the run script populate this field?

    Mira_Ghaly_0-1635894539017.png

    I believe you need to yes the Key Column as the eeid because the id is not yet there on the and you are trying to reference it from the Add Row Action

    Mira_Ghaly_1-1635894579954.png

     

     

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,702 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,026 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow