Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Answered

Can we sort the "Create HTML Table" In power Automate

(1) ShareShare
ReportReport
Posted on by 379

Hi, 

I have a Flow, Where I am creatin a table using "create HMTL table" inside the power automate, all are going good, but I want to sort the the Table data.

Like I have two columns in table, on first column I want to apply the grouping and for second column I want to apply the Alphabetical order sorting.

  • Suggested answer
    Rene Porto Profile Picture
    Rene Porto 2 on at
    Can we sort the "Create HTML Table" In power Automate
    Hi!

    There is no native way to apply a sort by items from a column in the select component and the HTML component. One way to do this is in the information that feeds the select, that is, the source information. In the case of Dataverse, in the list rows, there is the sort by option; just include the column name and desc or asc depending on your need.

    See the exemple in Microsoft image guide (name asc) .

    Screenshot of advanced options in the List rows card.
  • Verified answer
    Himanshu Kamboj Profile Picture
    Himanshu Kamboj 379 on at
    Can we sort the "Create HTML Table" In power Automate
    Yes we can sort the HTML table inside power automate.
     
    For this we need to use the "select" operator of "data Operation" before the "Create HTML table" step and here after mapping all the columns, the we will be having an array of records and now we can sort the array, means now we can apply the sorting on output of "select".
     

     
    and if array is string of array elements then expression will be sort(outputs('Simple_Array'))   and if you have array of objects then it will be sort(outputs('Simple_Array'),'object') .
    For more understanding please go through this link:  https://www.powertechtips.com/sort-array-power-automate/
     
     
  • RudyZhang Profile Picture
    RudyZhang Microsoft Employee on at
    RE: Can we sort the "Create HTML Table" In power Automate

    Hi,

     

    We are sorry to inform you that your question Can we sort the "Create HTML Table" In power Automate is not supported.

     

    However, you can use PowerAutomate built-in action to convert the data in the HTML Table into an array, sort the array, and then build the HTML Table with the sorted data, or sort the raw data directly before you build the HTML Table.

     

    If you think this is an essential feature, you can submit an idea to the Flow Ideas forum.

    The link is as follows:

    https://powerusers.microsoft.com/t5/Flow-Ideas/idb-p/FlowIdeas

     

    In addition, here is a solution to a problem similar to yours, which you can refer to if needed.

    Solved: Create HTML Table sorting - Power Platform Community (microsoft.com)

     

     

    I hope my answer is helpful to you! If you have any other questions, please feel free to contact me.

     

     

    Best Regards,

    Rudy Zhang

  • Suggested answer
    a33ik Profile Picture
    a33ik 84,325 Most Valuable Professional on at
    RE: Can we sort the "Create HTML Table" In power Automate

    Hello,

    Sort the original dataset you use. And done.

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

Congratulations 2024 Spotlight Honorees!

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December!

Congratulations to our December super stars! 🥳

Get Started Blogging in the Community

Hosted or syndicated blogging is available! ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,642 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,371 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans