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

Community site session details

Session Id : lypk3qpnMfZdrETX7sqbQo
Power Automate - Building Flows
Answered

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

Like (0) ShareShare
ReportReport
Posted on 18 Jul 2022 00:16:53 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?

 

 

 

I have the same question (0)
  • Verified answer
    v-yujincui-msft Profile Picture
    on 20 Jul 2022 at 08:25:30
    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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Tomac Profile Picture

Tomac 986 Moderator

#2
stampcoin Profile Picture

stampcoin 699 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 577 Super User 2025 Season 2