web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Export Gallery Data to...
Power Apps
Suggested Answer

Export Gallery Data to csv for multiple users.

(0) ShareShare
ReportReport
Posted on by
Hi,
 
I have built an app that takes entries from users where it captures date, update on actions (text), update types (Check boxes) and a few combo box linked text data and saves this to a SharePoint list.
 
I have built a view using gallery where the users can see the entries submitted by them and their peers, however, limited to their manager in common. I am using filters, sortbycolumns and multiple IFs (I am providing filters on the gallery screen) to allow users to filter based on combo box selections in the 4 filters I am using.
 
What I need help with is the Export button to publish the filtered data from gallery into a csv file. I tried using the below syntax but it does not allow users to append the data in the Export.csv that is on my OneDrive for Business. I have linked the Export.csv with edit access for entire organization too. For some users, only the headers of the table is updated while the actual data for entries is either blank or the first entry is repeated. Also at times, users can download my last patched data (again the 1st entry is fine for me, but the new entries are repeat of the first row)
 
Syntax for Export Button -
Clear(ExportCSVCol);
ForAll(ExportGal.AllItems As GalData,
Collect(ExportCSVCol,
{'1. Date':Date_Gal.Text,'2. Heading':Head_Gal.Text,'3. Description':Des_Gal.Text}
)
);
Set(_JSONFile,JSON(ExportCSVCol));
Set(SuccessVAR,ExportCSVFlow.Run(_JSONFile).completed);
If(SuccessVAR="true",Launch("https://orgmy.sharepoint.com/:x:/g/personal/orgaddress/link?e=bgGFnm&Download=1"))
 
 
What am I doing wrong or missing here?
Categories:
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,970 Super User 2026 Season 2 on at
    HI
     
    A couple things.
     
    1. I would go to the Flow (which isn't shared), in an instance where the person didn't get the correct data and review what data actually was sent to the flow.
    2. If the data was correct, then you know your bug is in the Flow
    3. If the data is NOT correct, then you know either you have a bug creating the data
    4. Why are you using ExportGal.Allitems as GalData? But you aren't using GalData anywhere.
    - While this isn't required in all cases.
     
    I would update it to just be 
    ForAll(ExportGal.AllItems,
        Collect(ExportCSVCol,
       {
           Date': ThisRecord.Date_Gal.Text,'
           Heading': ThisRecord.Head_Gal.Text,
           Description': ThisRecord.Des_Gal.Text
        }
      );
    );
    Please share the input and outputs of a flow instance that produced wrong data.
     
    It's possible that if you are using a Single Template file, that it could also be getting locked if multiple people are doing things or the flow or app has it locked.
     
    Just a suggestion, but please try what i have above and also please share more details.
    P.S. For users that have issues, do they always have issues? So if you have a single person who can repro it all the time it would be super easy to fix.
     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 409 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 252 Most Valuable Professional

Last 30 days Overall leaderboard