I have a requirement where users upload a CSV file, and I need to validate whether the column headers match a predefined template before parsing it into a CDT. Is there a way in Appian to check headers during file upload, preferably before running readcsvlogtoCDT()?
readcsvlogtoCDT()
Discussion posts and replies are publicly visible
Use the previewcsvforimport() function from the Excel Tools plugin with the numberOfRows parameter set to 1, which will read only the first row containing the CSV headers. Extract these headers and compare them against your predefined CDT fields or expected header list or validatedocumentheaders().
You can use the function validatedocumentheaders() from Excel Tools plugin to achieve the expected functionality.