The error reads
Error while parsing module "WORKORDR (8)":
Unknown identifier.
Line 6, position 35: [Identifier: SPEC_OPERATION_LOAD]
THEN vLoadSortSpec = @SpecCommand(SPEC_OPERATION_LOAD, SPEC_TYPE_SORT ...
^
The ^ mark points to the S in @SpecCommand (in case my formatting of the above gets fungled).
When I click on the line in the error box, my #include line is highlighted,
#include "WorkorderUsersSortSpec.sbas"
As I said, if I take the SBAS code in its entirety and plug it directly into the app hard code (and rem out the #include statement) the Program Editor is happy dappy.
The code I'm working with is
// Loads the Dispatchers' sort spec
Var vLoadSortSpec as String
IF ( (sUserId = "Jason") OR (sUserId = "Michelle") OR (sUserId = "John") OR (sUserId = "Chris") )
THEN vLoadSortSpec = @SpecCommand(SPEC_OPERATION_LOAD, SPEC_TYPE_SORT, "Workorder # Descending")
I have similar code in an SBAS file for my Invoice database, doing the same thing (loading sort specs) which is having the exact same problem. Program editor is fine with all my other SBAS files (although I had to rem out the ones that hide tree items, no biggy there, I'll get to that later).