Good Afternoon,
I have the attached SDK Script code that is set to export a .csv file to C:\TestData. The problem I'm running into is that the file is not passing tokens through to the CSV file. I'm new to .NET but cannot figure out why the token value is not passing through to my CSV and I was hoping someone could help point me in the right direction. Any help is much appreciated.
Thanks,
Nate
Protected Overrides Sub Execute() 'Wrap the code in a Try/Catch to catch any errors... Try 'Instantiate a new streamwriter... Dim csvWriter As New System.IO.StreamWriter("C:\TestData\Test.csv") Dim headerRow As String 'Will hold the header row values Dim dataRow As String 'Will hold the data row values Dim csvData As New StringBuilder 'We will append all of the data to this string object 'Here is the header row... headerRow = "Column Name 1,Column Name 2,Column Name 3,Column Name 4" csvData.AppendLine(headerRow) 'Here is the first data row... dataRow = "%(RetrieveFieldValues_Author), value 2, value 3" //This is where the token value is not passing through to my CSV csvData.AppendLine(dataRow) 'Here is the second data row... dataRow = "Value 1, Value 2, Value 3, Value 4" csvData.AppendLine(dataRow) 'Now write the CSV file and close the streamwriter... csvWriter.Write(csvData) csvWriter.Close 'Cleanup... csvWriter = Nothing csvData = Nothing Catch ex As Exception 'Send any error messages to workflow so they can be tracked... WorkflowApi.TrackError(ex.message) End Try End Sub