cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper V
Helper V

SQL Lookup Expression

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
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: SQL Lookup Expression

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.

View solution in original post

6 REPLIES 6
Highlighted
Community Support
Community Support

Re: SQL Lookup Expression

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.

Highlighted
Helper V
Helper V

Re: SQL Lookup Expression

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.
Highlighted
Community Support
Community Support

Re: SQL Lookup Expression

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.

Highlighted
Helper V
Helper V

Re: SQL Lookup Expression

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?

Highlighted
Helper V
Helper V

Re: SQL Lookup Expression

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

Highlighted
Community Support
Community Support

Re: SQL Lookup Expression

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.

View solution in original post

Helpful resources

Announcements
secondImage

August 2020 CYST Winners!

Check out the winners of the recent 'Can You Solve These?' community challenge!

thirdImage

Experience what's new for Power Automate

Join us for an in-depth look at the new Power Automate features and capabilities at the free Microsoft Business Applications Launch Event.

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Users online (3,801)