Query 1:
SELECT LEVEL0.PORTAL_LABEL || ' > ' || LEVEL1.PORTAL_LABEL || ' > ' || LEVEL2.PORTAL_LABEL || ' > ' || level3.PORTAL_LABEL PATH_TO_COMPONENT
FROM PSPRSMDEFN level3
, PSPRSMDEFN level2
, PSPRSMDEFN level1
, PSPRSMDEFN LEVEL0
WHERE level3.PORTAL_URI_SEG2 = 'Component Name here'
AND level3.PORTAL_PRNTOBJNAME = level2.PORTAL_OBJNAME
AND level2.PORTAL_PRNTOBJNAME = level1.PORTAL_OBJNAME
AND level1.PORTAL_PRNTOBJNAME = LEVEL0.PORTAL_OBJNAME
AND level3.PORTAL_NAME = level2.PORTAL_NAME
AND level2.PORTAL_NAME = level1.PORTAL_NAME
AND level1.PORTAL_NAME = LEVEL0.PORTAL_NAME
Query 2:
SELECT DISTINCT LTRIM (SYS_CONNECT_BY_PATH (PORTAL_LABEL, ' > '), ' > ') PATH FROM (
SELECT * FROM (SELECT * FROM PSPRSMDEFN WHERE PORTAL_NAME = 'EMPLOYEE')
CONNECT BY PRIOR PORTAL_PRNTOBJNAME = PORTAL_OBJNAME
START WITH (PORTAL_URI_SEG2 = UPPER ('Component Name here') AND PORTAL_REFTYPE = 'C' AND PORTAL_CREF_USGT = 'TARG')
) WHERE PORTAL_REFTYPE = 'C'
CONNECT BY PORTAL_PRNTOBJNAME = PRIOR PORTAL_OBJNAME
START WITH (PORTAL_OBJNAME = 'PORTAL_ROOT_OBJECT' AND PORTAL_REFTYPE = 'F')
Check if the Component is registered
SELECT LPAD('–',2*(LEVEL-1)) || PORTAL_LABEL "NAVIGATION”
FROM (SELECT PORTAL_LABEL, PORTAL_PRNTOBJNAME, PORTAL_OBJNAME, PORTAL_URI_SEG2 FROM PSPRSMDEFN A
WHERE PORTAL_NAME = ‘EMPLOYEE' ) B
WHERE B.PORTAL_PRNTOBJNAME != ' '
START WITH (B.PORTAL_URI_SEG2 IN
(SELECT D.PNLGRPNAME
FROM PSMENUITEM A, PSMENUDEFN B, PSPNLGROUP D
WHERE A.MENUNAME=B.MENUNAME
AND A.PNLGRPNAME = D.PNLGRPNAME
AND A.PNLGRPNAME LIKE UPPER('Enter Component Name'))
)
CONNECT BY PRIOR B.PORTAL_PRNTOBJNAME = B.PORTAL_OBJNAME
SELECT LEVEL0.PORTAL_LABEL || ' > ' || LEVEL1.PORTAL_LABEL || ' > ' || LEVEL2.PORTAL_LABEL || ' > ' || level3.PORTAL_LABEL PATH_TO_COMPONENT
FROM PSPRSMDEFN level3
, PSPRSMDEFN level2
, PSPRSMDEFN level1
, PSPRSMDEFN LEVEL0
WHERE level3.PORTAL_URI_SEG2 = 'Component Name here'
AND level3.PORTAL_PRNTOBJNAME = level2.PORTAL_OBJNAME
AND level2.PORTAL_PRNTOBJNAME = level1.PORTAL_OBJNAME
AND level1.PORTAL_PRNTOBJNAME = LEVEL0.PORTAL_OBJNAME
AND level3.PORTAL_NAME = level2.PORTAL_NAME
AND level2.PORTAL_NAME = level1.PORTAL_NAME
AND level1.PORTAL_NAME = LEVEL0.PORTAL_NAME
Query 2:
SELECT DISTINCT LTRIM (SYS_CONNECT_BY_PATH (PORTAL_LABEL, ' > '), ' > ') PATH FROM (
SELECT * FROM (SELECT * FROM PSPRSMDEFN WHERE PORTAL_NAME = 'EMPLOYEE')
CONNECT BY PRIOR PORTAL_PRNTOBJNAME = PORTAL_OBJNAME
START WITH (PORTAL_URI_SEG2 = UPPER ('Component Name here') AND PORTAL_REFTYPE = 'C' AND PORTAL_CREF_USGT = 'TARG')
) WHERE PORTAL_REFTYPE = 'C'
CONNECT BY PORTAL_PRNTOBJNAME = PRIOR PORTAL_OBJNAME
START WITH (PORTAL_OBJNAME = 'PORTAL_ROOT_OBJECT' AND PORTAL_REFTYPE = 'F')
Check if the Component is registered
SELECT LPAD('–',2*(LEVEL-1)) || PORTAL_LABEL "NAVIGATION”
FROM (SELECT PORTAL_LABEL, PORTAL_PRNTOBJNAME, PORTAL_OBJNAME, PORTAL_URI_SEG2 FROM PSPRSMDEFN A
WHERE PORTAL_NAME = ‘EMPLOYEE' ) B
WHERE B.PORTAL_PRNTOBJNAME != ' '
START WITH (B.PORTAL_URI_SEG2 IN
(SELECT D.PNLGRPNAME
FROM PSMENUITEM A, PSMENUDEFN B, PSPNLGROUP D
WHERE A.MENUNAME=B.MENUNAME
AND A.PNLGRPNAME = D.PNLGRPNAME
AND A.PNLGRPNAME LIKE UPPER('Enter Component Name'))
)
CONNECT BY PRIOR B.PORTAL_PRNTOBJNAME = B.PORTAL_OBJNAME
Hi,
ReplyDeleteAdviced Query is not working on PT8.45.
Could you please advice the correct query to resolve my issue to the component navigation.
Regards
Sekhar Kumar
Sekhar - The first Query works for the PeopleTools version 8.48 and above. I have added a an another Query which would work for you.
ReplyDelete