I'm having a hard time trying to use a variable in a certain place, is this something that can't be done or am I just going about it the wrong way?
I know this won't work, but I'm not sure what will. I'm trying to pass a variable for either a file name or the whole file path. Every time I run the script I won't even prompt for the variable and it says everything ran ok. If I remove it and just type the path in it'll prompt me for my other variable, CSV Rows, with no issues.
Imports System Imports System.Collections.Generic Imports System.ComponentModel Imports System.Data Imports System.Data.SqlClient Imports System.Text Namespace WorkflowActivity.Scripting.CSVScript '''<summary> '''Provides one or more methods that can be run when the workflow scripting activity is performed. '''</summary> Public Class Script1 Inherits ScriptClass90 'Declare the file path Dim fPath = "D:\LF_Import\Credit Card CSV\"+"%(FilePath)"+".csv" Public csvFile As String = fPath 'Declare the writer Public objWriter As New System.IO.StreamWriter(csvFile, True) Protected Overrides Sub Execute() 'Call the AppendCSV method AppendCSV End Sub Public Sub AppendCSV() Dim Row = TokenReplace("%(CSV Rows)") 'Write to the CSV file objWriter.WriteLine(Row) objWriter.Close() End Sub End Class End Namespace