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

  • with(
    userProfileID:rule!GWF_getUserProfSKByLanId(ri!owner).gwfUsrPrfSk,
    userRoleID:if(rule!APN_isBlank(userProfileID),null(),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)),
    owners:if(local!execRole,rule!GWF_ExecutiveGroupForActiveWorkflows(local!userRoleID),
    if(local!smRole,rule!GWF_SeniorManagerGroupForActiveWorkflows(userRoleID,userProfileID),
    if(local!supervisorRole,rule!GWF_SupervisorGroupForWorkflows(userRoleID,ri!owner),null()))),owners)

    GWF_ExecutiveGroupForActiveWorkflows:

    if(contains(ri!roleID,cons!GWF_EXECUTIVE_ROLE_ID),rule!GWF_getAllWFModelsByTypeAndActiveFlg(upper(cons!GWF_TYPE_WORKFLOW),cons!GWF_ACTIVE_FLAG_VALUE).gwfWfSk,null())

    GWF_SeniorManagerGroupForActiveWorkflow:

    if(contains(ri!userRoleID,cons!GWF_SENIOR_MANAGER_ROLE_ID),
    with(
    regionIDs:rule!GWF_getPrivilegeDataByProfileIDAndRoleID(ri!userProfileID,cons!GWF_SENIOR_MANAGER_ROLE_ID ,cons!GWF_ACTIVE_FLAG_VALUE).gwfUsrPrivId,
    regionLabels:if(rule!APN_isEmpty(local!regionIDs),null(),rule!GWF_getRefLookupDataByRefLookupID(local!regionIDs).gwfRefLkupShortDesc),
    wfIDs:if(rule!APN_isEmpty(local!regionLabels),null(),rule!GWF_getMetadataByTypeAndValue(upper(cons!GWF_TYPE_WORKFLOW),local!regionLabels,cons!GWF_ACTIVE_FLAG_VALUE).gwfWfId),
    SMWorkflows:if(rule!APN_isEmpty(local!wfIDs),null(),rule!GWF_getWFModelsDataByWFID(local!wfIDs,cons!GWF_ACTIVE_FLAG_VALUE).gwfWfSk),
    SMWorkflows),null())

    rule!GWF_SupervisorGroupForWorkflows:
    if(contains(ri!roleID,cons!GWF_SUPERVISOR_ROLE_ID),rule!GWF_getWorkflowsByWfTypeAndOwner(upper(cons!GWF_TYPE_WORKFLOW),ri!owner,cons!GWF_ACTIVE_FLAG_VALUE).gwfWfSk,null())
Reply

  • with(
    userProfileID:rule!GWF_getUserProfSKByLanId(ri!owner).gwfUsrPrfSk,
    userRoleID:if(rule!APN_isBlank(userProfileID),null(),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)),
    owners:if(local!execRole,rule!GWF_ExecutiveGroupForActiveWorkflows(local!userRoleID),
    if(local!smRole,rule!GWF_SeniorManagerGroupForActiveWorkflows(userRoleID,userProfileID),
    if(local!supervisorRole,rule!GWF_SupervisorGroupForWorkflows(userRoleID,ri!owner),null()))),owners)

    GWF_ExecutiveGroupForActiveWorkflows:

    if(contains(ri!roleID,cons!GWF_EXECUTIVE_ROLE_ID),rule!GWF_getAllWFModelsByTypeAndActiveFlg(upper(cons!GWF_TYPE_WORKFLOW),cons!GWF_ACTIVE_FLAG_VALUE).gwfWfSk,null())

    GWF_SeniorManagerGroupForActiveWorkflow:

    if(contains(ri!userRoleID,cons!GWF_SENIOR_MANAGER_ROLE_ID),
    with(
    regionIDs:rule!GWF_getPrivilegeDataByProfileIDAndRoleID(ri!userProfileID,cons!GWF_SENIOR_MANAGER_ROLE_ID ,cons!GWF_ACTIVE_FLAG_VALUE).gwfUsrPrivId,
    regionLabels:if(rule!APN_isEmpty(local!regionIDs),null(),rule!GWF_getRefLookupDataByRefLookupID(local!regionIDs).gwfRefLkupShortDesc),
    wfIDs:if(rule!APN_isEmpty(local!regionLabels),null(),rule!GWF_getMetadataByTypeAndValue(upper(cons!GWF_TYPE_WORKFLOW),local!regionLabels,cons!GWF_ACTIVE_FLAG_VALUE).gwfWfId),
    SMWorkflows:if(rule!APN_isEmpty(local!wfIDs),null(),rule!GWF_getWFModelsDataByWFID(local!wfIDs,cons!GWF_ACTIVE_FLAG_VALUE).gwfWfSk),
    SMWorkflows),null())

    rule!GWF_SupervisorGroupForWorkflows:
    if(contains(ri!roleID,cons!GWF_SUPERVISOR_ROLE_ID),rule!GWF_getWorkflowsByWfTypeAndOwner(upper(cons!GWF_TYPE_WORKFLOW),ri!owner,cons!GWF_ACTIVE_FLAG_VALUE).gwfWfSk,null())
Children
No Data