Hello,
I'm Emmanuel Katto from Uganda, I'm currently working with a table called ImportFiles, which includes an attachment field (file) containing a CSV file. My goal is to use CSV streaming to iterate over this CSV file and import its records into another table called ImportLines.
Here's my current FunctionStack:
Get ImportFile Record (varSelectedImportFile)
Create variable: fileURL (varSelectedImportFile.file.path)
Create File Resource (varFileResource)
Filename: Test.csv
FileData: fileURL
Get File Resource Data (varFileResourceData) from varFileResource
CSV Stream (varStream)
Input: varFileResource.data
For Each Loop varStream as varItem
Stop and Debug: varItem
However, I'm facing an issue where the CSV stream appears empty. As a test, I added a fileResource input variable and found that the CSV stream works perfectly with it.
My question is: How can I transform the import file stored in the ImportFile table, specifically in the attachment field (file), into a usable fileResource that can be used effectively in the CSV stream?
Regards
Emmanuel Katto Uganda