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

Notifications

Announcements

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,493 Super User 2025 Season 2 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard