Hi all,
i am creating an appengine export to CSV file, and i am trying to use an if statement to generate a file flag.
at the end of my export script i am adding in a string element to check if the account code is a 3 or not (if its a C its a 3, if not then its a D.
the error message is that cord has not been 'defined'
Error Message:
The compiled result was empty.
Error: Line 151: Identifier cord has not been defined yet.
code snipit below
//create (C) Credit or (D) Debit member
if(StringLeft(saccounts,1) =="3")
{
string cord = "C";
}
else
{
string cord ="D";
}
//get the current date for the export
string sdate = GetDateAsString(now);
AppendToLocalFile("C:\Export\BudgetExport.CSV",saccounts + "," + SourcePeriod + "," + value + "," + value + ",0," + scurrency + "," + cord + "," + sl1department + "," + sl2roomsegment + "," + sl3mealperiod + "," + sl4eventsproject + ",ZZZ,ZZZ," + sl7local + "," + sl8property + "," + sl9feesdetails + ",ZZZ,"
+ sbu + "_B_" + SourcePeriod + "," + sdate + "," +"ZBI01" + "," + sbu
+ "
");
}