cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
lfbenitez1
Microsoft
Microsoft

Sort order in an ADO (Azure DevOps) query is not being honored when using Azure DevOps Connector: Get query results

Issue:

Correctly configured/sorted query in ADO is not sorted the same way in Microsoft Flow output when using "Get query results" and "Create HTML table".

Desired outcome:

Create a table with my desired sort using Microsoft Flow based on an existing ADO configured query.

 

I'm using the Azure DevOps (ADO) connector "Get query results" to create an HTML table in an email. The query in ADO is configured correctly, along with the desired sorting (By Application, By Assembly, By Bug Type). From ADO I can use the "Send query to Outlook" and the table created in email appears with the properly sorted data.

 

When I use the "Get query results" connector combined with the "Create HTML table" function (I use the custom feature to create my own headers for field values), the table output is NOT sorted in the same order as it is configured in ADO. In fact, the table is simply sorted by ID (WorkItem ID). Which is not a value I even use in my table output.

 

Am I missing something? Shouldn't the "Get query results" retrieve data in the order the resulting data query (remember, when I'm in ADO and click Send Query to Outlook, the table generated is sorted correctly) or is "Create HTML table" automagically doing something with the data that breaks the desired sorting done by the query?

 

Thanks for any help and pointers on correcting this.

Larry

 

 

4 REPLIES 4
v-alzhan-msft
Community Support
Community Support

Hi @lfbenitez1 ,

 

Could you please share a screenshot of the configuration of your flow so we would better understand your requirement?

 

Best regards,

Alice       

 

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

Hi Alice, thanks for responding.

Here is my Flow configuration using "Get query results" and "Create HTML table":

Flow Table Config and ADO Query Connect.jpg

 

Below is what is configured in Azure DevOps for the actual query.

 

This is the query:

ADO Query.jpg

These are the columns I "show" in ADO:

ADO Columns Selected in Query.jpg

This is the Sorting criteria (which works in ADO) I have defined in ADO:

ADO Sorting in Query.jpg

 

As I mentioned in the original post and above, the Sorting in ADO works when I run the query in ADO; however, when I grab the query from Flow and then place values in a table and output it in an email, the data is sorted BY "ID"...which is NOT even in my ADO sorting criteria. I WANT my Flow output to be in the same sort order as the original ADO query.

parismiguel
New Member

I'm having the same issue, has this issue been solve?

 

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Top Solution Authors
Users online (1,157)