Description: Counts distinct employees with a selected movement indicator whose state changes between two year-month periods, optionally restricted to an organizational unit or its parent.
Calling convention: TE_CS_GetEmployeeCount("Category": String, "StartDateString": String, "EndDateString": String, ORGUNIT_ID: Integer, "ORGUNIT_ID_IS_PARENT": String): Integer
Parameters:
Category: numeric movement-indicator ID; the implementation converts it to Integer despite the registered String type.
StartDateString: numeric YYYYMM text used as the start period.
EndDateString: numeric YYYYMM text used as the end period.
ORGUNIT_ID: organization-unit ID; NULL disables unit filtering.
ORGUNIT_ID_IS_PARENT: TRUE filters by parent unit, FALSE by direct unit.
Returns: Number of matching employees. Most invalid inputs return NULL; a missing start period can leave the result undefined.
Availability: Default; TE/CS site-specific and dependent on MA, MA_MoveIndicator and MA_TIME_Detail.
Example:
Count := TE_CS_GetEmployeeCount(1, "202501", "202506", 43, "FALSE");