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
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":
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.
This worked for me!
https://sharepains.com/2019/07/13/sort-an-array-or-collection-in-microsoft-flow/
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!
User | Count |
---|---|
15 | |
10 | |
3 | |
3 | |
3 |