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".
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.
Hi @lfbenitez1 ,
Could you please share a screenshot of the configuration of your flow so we would better understand your requirement?
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":
Below is what is configured in Azure DevOps for the actual query.
This is the query:
These are the columns I "show" in ADO:
This is the Sorting criteria (which works in ADO) I have defined in ADO:
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.
I'm facing the same issue. I tried sorting by standard columns, such as Assigned To, as well as custom columns, and it always returns the results sorted by ID. It seems like maybe this is coming from ADO this way. If I test the flow and look at the output of the Get Query Results step, it shows the raw data, and it's sorted by ID. I guess it's not something that can be controlled by the Flow, but I'm not sure how make ADO return the sorted results. Any tips would be appreciated.
Check out the News & Announcements to learn more.
Check out the new Power Platform Community Connections gallery!
Congratulations, the new Super User Season 2 for 2021 has started!
Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.