How to merge two Export OQL to CSV file and send that as a combined file.

I want to combine two OQL query and export it as a CSV document to user.
1 answers

Probably, the best way is to combine the two queries into one query by using the Union All operator. 


If this is somehow not possible, you could consider using the "StringFromFile" action from CommunityCommons to get the string contents from both CSV files that were generated from your OQL queries. You can concatenate these strings to merge the data. The "StringToFile" action can then be used to write this combined string back into a new CSV file. This essentially merges the two sets of data that were retrieved through separate OQL queries.


However, it should be possible to combine the two queries, which is the better option