Issue with function call in CSV Export

Hi All,..

I have an issue with the CSV Export component and calling the Function from the definition. We are using version 8.1.4. I tried two different options:

1. Calling function using "LineScriptname" parameter - I created a function returning a valid CSV line (e.g. "39;Department 1;DEP_1") as string and I got following error: "Script block 39;Department 1;DEP_1 not found."

2. Calling function using "LineDefinition" with the following value "$$Ident_locality$$;$$ShortName$$;$$LongName$$;($$Street$$);" + CCC_Export_locality("$$UID_Locality$$") + ";$$FK(CCC_UID_TIMSIMLDAPContainer).cn$$". All $$ notations were resolved successfully except the function part (please see the function below). There is an issue, because the function is called every time with the right parameter, but result is empty. If I change the function to print out UID_Locality which came in as a parameter or any fixed value it is returned successfully and is present in the CSV file.

Public Function CCC_Export_locality(ByVal UID_Locality As String) As String
	Dim xObjectKeyQBMServer As String = Connection.GetSingleProperty("TSBITData", "ObjectKeyValue", String.Format("UID_Org = '{0}'", UID_Locality))
	Dim ITOperatingData As String = Connection.GetSingleProperty("QBMServer","Ident_Server", String.Format("XObjectKey = '{0}'", xObjectKeyQBMServer))

	Return ITOperatingData
End Function