Hi All,
The requirement is to send a combined csv file as an attachment with common field/columns from two different entities. Using List rows action & create csv table, I am able to achieve two csv files for each.
I want to merge and send the combined csv files as a single attachment.
Any help is much appreciated.
Regards,
Hemanth DR
This is a very efficient solution.
However, I am trying to merge multiple (undecided, depending on Dataverse Table size) Create CSV table actions based on a loop. Any ideas to keep concatenating result of the latest one to the previously concatenated ones?
I saw the advise for three files, however I will have anywhere between 3- 7 Create a CSV actions out of which one will be preliminary and others in a Do until loop. (I am using Skip Token to list rows dataverse table)
Thanks
repeat his steps for the second compose, (skiping file header etc), then either do a concat(concat( or setup an additional compose and do concat(outputoffirstconcat,third file contents)
Hi @Paulie78 , this is a brilliant solution, how would you then concat a 3rd table to the results of the first 2? I have tried unsuccessfully so far
Thanks @Paulie78 , Saved my day . Exactly what I was looking for. Wanted to append one Create CSV output to another and your solution worked like a charm.
Hi There, Please help me with any ideas here, can this be implemented with Export To File from Paginated Reports in Power Automate(Other than using Power Automate Desktop to create flow and then scheudling in Power Automate); I'm trying to merge 2 CSV Files( as it gives error for file size limitation to Create File to get the whole data in a single file). Also, Append overwrites the data in the file. Any suggestions would be helpful. Thank you.
It is difficult to be sure. But I read the original post to mean that he is already able to successfully generate two CSV files. He just wants them to be a single CSV file. Perhaps the original poster will clarify.
I believe the intent is to merge AKA join the two tables, not union them
It is quite easy to do. The main complication is that the "Create CSV Table" action helpfully includes a header row. If you join the output of two of these actions you will have a extra header row where the second CSV file begins. So I would do something like this:
First, the two separate CSV files are created.
Then there is a compose action which splits the output of the second CSV on a line break to turn it into an array. The first element of that array is skipped and then the array is turned back into a string but without the header row. The expression used for this is:
join(skip(split(body('Create_CSV_table_2'), decodeUriComponent('%0A')), 1), decodeUriComponent('%0A'))
Then the two string outputs of the original CSV and the RemoveHeaderFromCSV2 actions are combined in a final compose action with the expression:
concat(body('Create_CSV_table'),outputs('RemoveHeaderFromCSV2'))
Blog: tachytelic.net
YouTube: https://www.youtube.com/c/PaulieM/videos
If I answered your question, please accept it as a solution 😘
Check out this post. I think what you're after is trying to merge two arrays (list rows) and include the values from one file where a key column matches the other file:
Solved: Re: how to merge two arrays - Power Platform Community (microsoft.com)
WarrenBelz
146,743
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
66,079
Most Valuable Professional