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 Automate
Answered

SQL Lookup Expression

(0) ShareShare
ReportReport
Posted on by 218

Hi, to populate certain fields in the "Populate Word" piece, I'm having some trouble creating the expression.  Or is there a way to pull in all of the rows of the table another way?  Not worried about copying/pasting/modifying expressions...once it's in place it will not change for a long time.


Here's a little more detail...

 

  • SQL Server Table - dbo.descriptions
  • Example of row detail, Title is ABC123
  • Looking to pull the Description for ABC123
Categories:
I have the same question (0)
  • v-litu-msft Profile Picture
    on at

    Hi @ez1138,

     

    To use the filter query could find the Title is ABC123, there is using ODATA syntax, Title eq 'ABC123', eq means equals.

    Annotation 2020-07-21 140000.jpg

    For more ODATA syntax, you could refer to this document:

    https://www.odata.org/documentation/odata-version-2-0/uri-conventions/ 

     

    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.

  • ez1138 Profile Picture
    218 on at

    Thanks for the reply.  That did not work.  ABC123 is simply the name, title is the column and there are hundreds of rows.  So if a row has ABC123 as the title, I would like to pull the "description" of "This is a description".

     

    IDTitleDescription
    1ABC123This is a description.
    2DEF123This is a description.
  • v-litu-msft Profile Picture
    on at

    Hi @ez1138,

     

    OK, after you get rows which title equals to "ABC123", you could use the expression to get the Description:

    Annotation 2020-07-22 180850.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.

  • ez1138 Profile Picture
    218 on at

    Awesome, I will give it a try and let you know.  In addition to the description column, what's the best practice to add additional columns based on the same Title column?

  • ez1138 Profile Picture
    218 on at

    Hi, knowing someone was missed since I did not see a spot/location to place in "Title", it did not work as expected.  Referencing an earlier reply, ABC123 is just an example.  I literally have hundreds of rows.  Are you saying that I have to create an "apply to each" hundreds of times?

     

    flow1.jpg

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

    Hi @ez1138,

     

    If you want to add multiple condition into the filter query, such as ID, you could add the filter query as below:

    Title eq '123' and ID eq '12'

     

    It's no need to create multiple Apply to each action, you just need to one, the Apply to each will loop through all items of the Get rows output. Could you please share your Flow run history and status? If there is any error when it runs, please share the error information, thanks.

     

    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

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 503 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard