Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

avoid repeated Lookup calls by saving the record result in a variable

(0) ShareShare
ReportReport
Posted on by 261

Say you have three lists, ListA, ListB, and ListC.

 

Some columns in ListA are my keys to retrieve data from Lists B and C. I use other ListA columns to set fill colors and things like that.

 

So far, I have been assigning Lookup results to individual variables, but I believe that the code would be cleaner if I could assign the whole Lookup result to a record variable, and the just use the record elements when I need them.

 

Is this possible? how?

 

 

 

  • Verified answer
    v-yujincui-msft Profile Picture
    on at
    Re: avoid repeated Lookup calls by saving the record result in a variable

    Hi @mobilismexico ,

     

    Do you want to save a record as a variable?

    I have made a simple test for your reference. I append a record to an array variable and then get the value of each field by expression.

     

    1. Here is my SharePoint list.

    vyujincuimsft_0-1658305250952.png

    2. Here is my Flow.

    first(variables('VarRecord'))?['fieldname']

    vyujincuimsft_2-1658305428925.png

    vyujincuimsft_3-1658305506259.png

    Result Screenshot:

    vyujincuimsft_1-1658305308148.png

     

     

    Best Regards,
    Charlie Choi

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1