Question
How to resolve "Invalid index: Cannot index property 'employee' of type Text into null value of type list" this error?
local!supervisorList: if(
contains({ 3, 6 }, ri!selectedDashboard),
index(
/*a!isNotNullOrEmpty(tointeger(ri!reportingEmployeeList)),*/
ri!reportingEmployeeList,
wherecontains(
cons!INO_DESIG_ID_SUPERVISOR,
tointeger(
index(
ri!reportingEmployeeList,
"designationId",
0
)
)
),
{}
),
null
),
local!supervisorHierarchyList: if(
contains({ 3, 6 }, ri!selectedDashboard),
a!forEach(
items: local!supervisorList,
expression: 'type!{urn:com:appian:types:INO}INO_employeeHierarchyHelper'(
employee: fv!item,
directReportEmployeeList: index(
typeof(ri!reportingEmployeeList),
wherecontains(
index(local!supervisorList, "internalEmpId"),
tointeger(
index(
ri!reportingEmployeeList,
"currentReportingManagerId",
0
)
)
),
{}
)
/*index(
local!supervisorList,
wherecontains(
/*fv!item.internalEmpId,*/
/*index(ri!reportingEmployeeList, "internalEmpId"),
tointeger(
index(
ri!reportingEmployeeList,
"currentReportingManagerId",
0
)
)
),
{}
)*/
)
),
null
),
Above is my code and below is the data CDT screenshot


