Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Reordering the columns of the export csv file

Like (1) ShareShare
ReportReport
Posted on 12 Nov 2024 17:45:18 by 52
Hi
I am exporting a collection from power apps to CSV file via an instant flow (by clicking export button).
When I export the collection, the order of the columns is by default in ascending order.
I want to give a custom order and state which column should come first followed by which column. How to do it? Any help is much appreciated.
 
 
ForAll( gallery.allitems,
Collect(
        coldataexport,
        {
            Device_Name: ThisRecord.Device_Name,
            Policy_Name: ThisRecord.Policy_Name,
            Rule_Name: ThisRecord.Rule_Name,
          
        }
    )
);
Concurrent(
    Notify("Downloading report",NotificationType.Information),
    Set(Varfilelink,export1.Run(JSON(coldataexport,JSONFormat.IgnoreBinaryData & JSONFormat.IgnoreUnsupportedTypes)).file));   Launch(Varfilelink);Notify("Report Download complete",NotificationType.Success);)
  • CU10090150-0 Profile Picture
    52 on 13 Nov 2024 at 08:39:31
    Reordering the columns of the export csv file
    Thanks much @trice602
    I used the custom columns option adding the dynamic content using item()?['column_name'] and it worked.
  • Verified answer
    trice602 Profile Picture
    13,768 Super User 2025 Season 1 on 12 Nov 2024 at 18:26:10
    Reordering the columns of the export csv file
    Hi,
     
    In the create csv table action, change the columns to custom and then put the columns in the order of your choice.  The left side if the label of the column and right side is the dynamic content.
     
     
    ------------------------------------------------


    If this was helpful, please like and/or mark as a verified answer to help others find this too!


    Always glad to help! 💯💯💯💯💯

    Tom 

    Follow me on LinkedIn - Thomas Rice, PMP | LinkedIn

     


     

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Automate - Building Flows

#1
stampcoin Profile Picture

stampcoin 87

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 70 Super User 2025 Season 1

#3
David_MA Profile Picture

David_MA 48 Super User 2025 Season 1

Overall leaderboard