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
Discussion posts and replies are publicly visible
You get this error when you try to use the dot-notation to access a field in a data structure. But I do not see that in your code snippet.
BTW, what is line 27 meant to do?
BBTW, nested CDTs are not recommended.
If I without use typeof then also same error occurred. So how to resolve it. Please suggest.
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( 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 ),
Hm ....
What I mean is that
typeof(ri!reportingEmployeeList),
returns the ID of the data type of that rule input. Trying to index() into this makes no sense for me. Help me understand what you are trying to do.