exporting files using xappex

xappex doesnt have good documentation on exporting files, but they make it pretty easy, you just need to do it in two steps.

their docs say

“Now, any time you include a field of type base64 in your SOQL Query – it will be converted to a file and saved at this location”

but this not entirely true. On a support ticket they clarified:

“VersionData only comes down as an actual file when it’s queried directly from ContentVersion, pulled through a relationship it arrives as text,”

so this query doesnt work, it returns text

SELECT LinkedEntityId,ContentDocument.LatestPublishedVersionId, ContentDocumentId,ContentDocument.Title,ContentDocument.LatestPublishedVersion.Title,ContentDocument.LatestPublishedVersion.VersionData
FROM ContentDocumentLink
WHERE LinkedEntityId = ‘006Ui00000biDgmIAE’

the approach that works

query 1: gets the LatestPublishedVersionId from contentDocumentLink and stores the data to a worksheet
query 2: gets the contentVersion using IN (excel rows) against LatestPublishedVersionId

Note: if you reference the sheet column ie A:A then it throws an error for the header row

the proper format is where Id IN [@TableName[ColumnName]]

 
0
Kudos
 
0
Kudos

Now read this

Creating a unique collection in flow

this is a very short post, that shows one small thing that can be very useful - creating a collection of unique elements in visual workflow there are now quite a few operators on collections in flow, but none of them are ‘remove... Continue →