Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Output Expression

(0) ShareShare
ReportReport
Posted on by 218

Hi, to populate word I have a SQL table.  It pulls in the data fine.  For additional data, not driven by the ID from that SQL Server table I would like to write an output expression (I believe) to yield a result I'm looking for.  Based on feedback from someone, I created an array from an Excel worksheet.  I have this same data in another SQL table too.

 

Sample Table

 

Control NameControl Detail
ABC123This is the detail for ABC123
DEF123This is the detail for DEF123

 

My goal in the Word document is to have an entry for the control detail somewhere in the document.  For instance, {ABC123 - Control Detail} and have the expression pull the detail for control ABC123.  This is one example.  I have hundreds of different entries/fields I will be placing in the Word document.  It's fine, since those will most likely rarely change.

 

FYI / I created the array as a recommendation from someone in the forum.  Whatever the best way to do it would be great.

 

powerautomate1.jpgpowerautomate2.jpg

 

Thanks for any insight!

  • Verified answer
    v-litu-msft Profile Picture
    on at
    Re: Output Expression

    Hi @ez1138,

     

    There is some structure error in the Append to array variable action, the structure should be:

    {
    "Column1": "@{items('Apply_to_each')?['Column1']}",
    "Column2": "@{items('Apply_to_each')?['Column2']}"
    }

    Annotation 2020-07-24 144403.jpg

     

    Best Regards,
    Community Support Team _ Lin Tu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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