Hi, I have a record type in which I have set the filters to view the record

Hi,
I have a record type in which I have set the filters to view the record based on the logged In User using "in" operator . If there are no records for the user, I am getting the error as "cannot apply "in" operator to the record field".
Please provide suggestions....

OriginalPostID-113124

OriginalPostID-113124

  Discussion posts and replies are publicly visible

Parents
  • rule!GWF_getWorkflowsByWfTypeAndOwner(upper(cons!GWF_TYPE_WORKFLOW),ri!owner,cons!GWF_ACTIVE_FLAG_VALUE).gwfWfSk--->returns empty result.
    I modified the main rule "displayWorkflowsbasedOnRole" to check null condition for all the workflows.Now my expression rule will be:
    with(
    userProfileID:rule!GWF_getUserProfSKByLanId(ri!owner).gwfUsrPrfSk,
    userRoleID:if(rule!APN_isBlank(userProfileID),{},rule!GWF_getUserPrivIdByProfId(local!userProfileID,cons!GWF_ACTIVE_FLAG_VALUE).gwfUsrRoleId),
    execRole:if(rule!APN_isEmpty(userRoleID),false(),contains(local!userRoleID,cons!GWF_EXECUTIVE_ROLE_ID)),
    smRole:if(rule!APN_isEmpty(userRoleID),false(),contains(local!userRoleID,cons!GWF_SENIOR_MANAGER_ROLE_ID)),
    supervisorRole:if(rule!APN_isEmpty(userRoleID),false(),contains(local!userRoleID,cons!GWF_SUPERVISOR_ROLE_ID)),
    execWF:rule!GWF_ExecutiveGroupForActiveWorkflows(local!userRoleID),
    smWF:rule!GWF_SeniorManagerGroupForActiveWorkflows(userRoleID,userProfileID),
    supervisorWF:rule!GWF_SupervisorGroupForWorkflows(userRoleID,ri!owner),
    workflowIDs:if(local!execRole,if(rule!APN_isEmpty(execWF),{},local!execWF),
    if(local!smRole,if(rule!APN_isEmpty(smWF),{},local!smWF),
    if(local!supervisorRole,if(rule!APN_isEmpty(supervisorWF),{},local!supervisorWF),{-1}))),workflowIDs)
    Now it is working fine.Thanks!!
Reply
  • rule!GWF_getWorkflowsByWfTypeAndOwner(upper(cons!GWF_TYPE_WORKFLOW),ri!owner,cons!GWF_ACTIVE_FLAG_VALUE).gwfWfSk--->returns empty result.
    I modified the main rule "displayWorkflowsbasedOnRole" to check null condition for all the workflows.Now my expression rule will be:
    with(
    userProfileID:rule!GWF_getUserProfSKByLanId(ri!owner).gwfUsrPrfSk,
    userRoleID:if(rule!APN_isBlank(userProfileID),{},rule!GWF_getUserPrivIdByProfId(local!userProfileID,cons!GWF_ACTIVE_FLAG_VALUE).gwfUsrRoleId),
    execRole:if(rule!APN_isEmpty(userRoleID),false(),contains(local!userRoleID,cons!GWF_EXECUTIVE_ROLE_ID)),
    smRole:if(rule!APN_isEmpty(userRoleID),false(),contains(local!userRoleID,cons!GWF_SENIOR_MANAGER_ROLE_ID)),
    supervisorRole:if(rule!APN_isEmpty(userRoleID),false(),contains(local!userRoleID,cons!GWF_SUPERVISOR_ROLE_ID)),
    execWF:rule!GWF_ExecutiveGroupForActiveWorkflows(local!userRoleID),
    smWF:rule!GWF_SeniorManagerGroupForActiveWorkflows(userRoleID,userProfileID),
    supervisorWF:rule!GWF_SupervisorGroupForWorkflows(userRoleID,ri!owner),
    workflowIDs:if(local!execRole,if(rule!APN_isEmpty(execWF),{},local!execWF),
    if(local!smRole,if(rule!APN_isEmpty(smWF),{},local!smWF),
    if(local!supervisorRole,if(rule!APN_isEmpty(supervisorWF),{},local!supervisorWF),{-1}))),workflowIDs)
    Now it is working fine.Thanks!!
Children
No Data