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 / How to export two shar...
Power Apps
Suggested Answer

How to export two sharepoint lists into one excel (csv) on powerapps

(1) ShareShare
ReportReport
Posted on by 6
Sharepoint lists:
DRS_main (contains SeqNum (as primary key), clientName, imexRefNum)
DRS_doctype (contains SeqNum (as reference key), sadBrokerDocDef, sadBrokerForReg)
 
I created a powerautomate on my powerapps to export sharepoint lists thru csv then will send to email the output but I cannot get the drs_doctype fields using this flow (see below) on my powerapps
I have the same question (0)
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,976 Moderator on at
    Hi,
     
    There are a few ways, here is just one. 
     
    0. Create and Initialize an string. I suggest adding headers to it, so that it has the format you want AND has headers already (using commas separation) plus add a carriage return (using the encode
    here is agreat article, I know it talks about removing them using this, but it is also the way to add them.
    So the 0 line of code will be the headers + an expression adding the carriage return to the same string
     
    1. You are going to need to create an Apply to Each with the input being Doc Main
    Inside the Apply to each
    a. Do a Get items from the DRS docType using the Seq number you get from the current loop of step 2.
    b. add a Condition
    In the left side put the expression length('insert the body value from step a')
    middle make is equal too
    right 1
     
    This way you can check if you found the 1 record
    in the yes side
    c. use an Append to string, adding in all the fields from the Outer current Loop and the inner Current Loop together and also using the decode etc to add the carriage return
     
    When all of the looping is done, you will have a single string that has all the rows in it in a CSV format.
     
    Now you can use Create File using the String Variable 
     
    Done
     
    If this helps you please mark as the answer
     
     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 633

#2
11manish Profile Picture

11manish 588

#3
Valantis Profile Picture

Valantis 457

Last 30 days Overall leaderboard