Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

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?
  • Suggested answer
    Michael E. Gernaey Profile Picture
    41,339 Super User 2025 Season 1 on at
    Export Gallery Data to csv for multiple users.
    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

Understanding Microsoft Agents - Introductory Session

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

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,700 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,015 Most Valuable Professional

Leaderboard