Is Not Declared
I have a calculation in one of my maps that I am unable to get to work. I keep getting LEFT and RIGHT is not declared.I have tried to add dim LEFT(_BATCHID,6) as string and dim RIGHT(_BATCHID,2) as string but I end up with a document error.return _GPCONTRACTORCODE & LEFT(_BATCHID,6) & RIGHT(_BATCHID,2)
Answers
Evan,
Right and Left are not vb.net nor C# commands when creating a calculated field. In .NET you need to use Substring commands and/or InStr commands to get what you need.
For example
1. Left = Get the batch id starting at the first character and the next six
2. Right = Get the two right characters
return _GPCONTRACTORCODE & _BATCHID.Substring(0,6) & _BATCHID.Substring(_BATCHID.Length-2,2)
Right and Left are not vb.net nor C# commands when creating a calculated field. In .NET you need to use Substring commands and/or InStr commands to get what you need.
For example
1. Left = Get the batch id starting at the first character and the next six
2. Right = Get the two right characters
return _GPCONTRACTORCODE & _BATCHID.Substring(0,6) & _BATCHID.Substring(_BATCHID.Length-2,2)