Www.regouniversity.com Clarity Educational Community Advanced Maximizing Portlet Function to...

Post on 19-Dec-2015

217 views 0 download

Transcript of Www.regouniversity.com Clarity Educational Community Advanced Maximizing Portlet Function to...

www.regouniversity.comClarity Educational Community

Advanced Maximizing Portlet Function to Personalize Output

Presented by: Sangeet Chourey and Chris Wuenstel | Date Prepared: April 2015

2 Clarity Educational Community

Agenda• Advanced Portlet Types– Multi-Dimensional– Hierarchical

• Multi-Dimensional– Syntax– How-To Walkthrough

• Hierarchical– Syntax– How-To Walkthrough

• Questions

Example Queries For Presentation

Example_Queries.txt

3 Clarity Educational Community

Multi-DimensionalAdvanced Portlet Types

Y

X

4 Clarity Educational Community

HierarchicalAdvanced Portlet Types

Projects

Tasks

Resources

5 Clarity Educational Community

Syntax

Good news everyone, no new syntax to learn!DimensionsSELECT @SELECT:DIM:USER_DEF:IMPLIED:RESOURCE:RES.ID:RES_ID@ ,@SELECT:DIM_PROP:USER_DEF:IMPLIED:RESOURCE:RES.FULL_NAME:RES_FULL_NAME@FROM SRM_RESOURCES RESWHERE @FILTER@

Each dimension needs a Unique ID and Property Field.First line: Unique IDSecond line: Property Field

Multi-Dimensional Portlet

6 Clarity Educational Community

Syntax – Continued

Adding a second dimension.

SELECT @SELECT:DIM:USER_DEF:IMPLIED:Y:Y.ID:Y_ID@ ,@SELECT:DIM_PROP:USER_DEF:IMPLIED:Y:Y.COLUMN:Y_COLUMN@ ,@SELECT:DIM:USER_DEF:IMPLIED:Y:X.ID:X_ID@ ,@SELECT:DIM_PROP:USER_DEF:IMPLIED:Y:X.COLUMNS:X_COLUMNS@FROM Y_AXIS YLEFT JOIN X_AXIS X ON X.YID = Y.IDWHERE @FILTER@

Multi-Dimensional Portlet

Y-Axis

X-Axis

7 Clarity Educational Community

Going from 1-Dimension -> 2-DimensionsMulti-Dimensional Portlet

Y-Axis Unique ID

Y-Axis Display(Property) Field X-Axis Unique ID

X-Axis Display(Property) Field

X-Axis Metric

8 Clarity Educational Community

Going from 1-Dimension -> 2-Dimensions cont.

SELECT @SELECT:DIM:USER_DEF:IMPLIED:Y:RES.ID:RES_ID@ ,@SELECT:DIM_PROP:USER_DEF:IMPLIED:Y:RES.FULL_NAME:RES_FULL_NAME@ ,@SELECT:DIM_PROP:USER_DEF:IMPLIED:Y:ACT.SLICE_DATE:DATE_ID@ ,@SELECT:DIM_PROP:USER_DEF:IMPLIED:Y:TO_CHAR(ACT.SLICE_DATE, 'Mon, YYYY'):DATE_DISPLAY@ ,@SELECT:METRIC:USER_DEF:IMPLIED:SUM(ACT.SLICE):HOURS@FROM SRM_RESOURCES RESJOIN PRASSIGNMENT A ON A.PRRESOURCEID = RES.IDJOIN PRJ_BLB_SLICES ACT ON A.PRID = ACT.PRJ_OBJECT_IDWHERE @FILTER@ AND ACT.SLICE_REQUEST_ID = (SELECT ID FROM PRJ_BLB_SLICEREQUESTS WHERE REQUEST_NAME = 'MONTHLYRESOURCEACTCURVE')AND ACT.SLICE_DATE BETWEEN TRUNC(@WHERE:PARAM:USER_DEF:DATE:START_DATE@, 'MONTH') AND TRUNC(@WHERE:PARAM:USER_DEF:DATE:FINISH_DATE@, 'MONTH')GROUP BY RES.ID,RES.FULL_NAME,ACT.SLICE_DATE

Multi-Dimensional Portlet

Change to X

Converts any date input to the first of the month.Example: 4/13/2015 -> 4/1/2015

Change to DIM

9 Clarity Educational Community

Multi-Dimensional Final Query

SELECT @SELECT:DIM:USER_DEF:IMPLIED:Y:RES.ID:RES_ID@ ,@SELECT:DIM_PROP:USER_DEF:IMPLIED:Y:RES.FULL_NAME:RES_FULL_NAME@ ,@SELECT:DIM:USER_DEF:IMPLIED:X:ACT.SLICE_DATE:DATE_ID@ ,@SELECT:DIM_PROP:USER_DEF:IMPLIED:X:TO_CHAR(ACT.SLICE_DATE, 'Mon, YYYY'):DATE_DISPLAY@ ,@SELECT:METRIC:USER_DEF:IMPLIED:SUM(ACT.SLICE):HOURS@FROM SRM_RESOURCES RESJOIN PRASSIGNMENT A ON A.PRRESOURCEID = RES.IDJOIN PRJ_BLB_SLICES ACT ON A.PRID = ACT.PRJ_OBJECT_IDWHERE @FILTER@ AND ACT.SLICE_REQUEST_ID = (SELECT ID FROM PRJ_BLB_SLICEREQUESTS WHERE REQUEST_NAME = 'MONTHLYRESOURCEACTCURVE')AND ACT.SLICE_DATE BETWEEN TRUNC(@WHERE:PARAM:USER_DEF:DATE:START_DATE@, 'MONTH') AND TRUNC(@WHERE:PARAM:USER_DEF:DATE:FINISH_DATE@, 'MONTH')GROUP BY RES.ID,RES.FULL_NAME,ACT.SLICE_DATE

Multi-Dimensional Portlet

10 Clarity Educational Community

Creating QueryMulti-Dimensional Portlet

Administration -> Queries Click New

Enter “Query Name” and “Query ID”Click “Save and Continue”

11 Clarity Educational Community

Creating QueryMulti-Dimensional Portlet

Delete old and paste new query here

Click “Save and Continue”

12 Clarity Educational Community

Creating QueryMulti-Dimensional Portlet

No need to change anything here

Metric

Y-Axis

X-Axis

13 Clarity Educational Community

Creating PortletMulti-Dimensional Portlet

Administration -> Portlets Click NewClick “Grid Portlet”

Enter “Portlet Name”And “Portlet ID”

Browse for Query

Click Next

14 Clarity Educational Community

Creating PortletMulti-Dimensional PortletDon’t changeClick Next

Click “Finish and Open”

Click “List Column Section”And then Layout

15 Clarity Educational Community

Creating PortletMulti-Dimensional Portlet

Changes

Click Save

16 Clarity Educational Community

Creating PortletMulti-Dimensional Portlet

Click “List Column Section”And then Fields

Click Save

Changes

17 Clarity Educational Community

Creating PortletMulti-Dimensional Portlet

Click Resource Properties button

Uncheck “Allow Word Wrapping in Column”

Click “Save and Return”

18 Clarity Educational Community

Creating PortletMulti-Dimensional Portlet

Click “List Filter Section”And then Layout

Add “param_start_date”And then “param_finish_date”

Remove “Filter”Change to Expanded

Click Save

19 Clarity Educational Community

Creating PortletMulti-Dimensional Portlet

Click “List Filter Section”And then Fields

Change Labels

Click Save

20 Clarity Educational Community

Creating PortletMulti-Dimensional Portlet

Click “Finish Date” Properties button

Select “Rolling Date”Set as “End of Previous Month”

Make Required

Click “Save and Return”

21 Clarity Educational Community

Creating PortletMulti-Dimensional Portlet

Click “Start Date” Properties button

Select “Rolling Date”Set as “Start of Current Year”

Make Required

Click “Save and Return”

22 Clarity Educational Community

Creating PortletMulti-Dimensional Portlet

Add to a page, and view all of your hard work!

23 Clarity Educational Community

Syntax

• Two new parameters:– HG_HAS_CHILDREN

• Is null if there aren’t any children• Contains the value to be used in the child query

– HG_ROW_ID• Is null if the row is top parent• Contains the value to be used in the child query• Same value as HG_HAS_CHILDREN

Confusing, I Know!

Hierarchical Portlet

24 Clarity Educational Community

Syntax cont.

• Unions are quite commonly used – not always the most efficient, but they are the easiest way

Parent QueryUnionChild Query

• You can have more than one child query • Don’t have too many child queries– Limit it to only a few child queries

Hierarchical Portlet

25 Clarity Educational Community

Creating Parent QueryHierarchical Portlet

SELECT INV.ID PRID , INV.NAME , INV.SCHEDULE_START , INV.SCHEDULE_FINISH , NVL(ROUND(INV.LABOR_ACTSUM/3600,2),0) ACTUALS , INV.ID HG_HAS_CHILDRENFROM INV_INVESTMENTS INVWHERE INV.ODF_OBJECT_CODE = 'project'AND @WHERE:PARAM:USER_DEF:STRING:HG_ROW_ID@ IS NULL

Going to first bring in projects, and the current total actuals

This is what we are sending to the child query to get the corresponding children

HG_ROW_ID is null because this is the top level

26 Clarity Educational Community

Creating Child QueryHierarchical Portlet

SELECT TSK.PRID , TSK.PRNAME NAME , TSK.PRSTART SCHEDULE_START , TSK.PRFINISH SCHEDULE_FINISH , NVL(ROUND(SUM(PRA.PRACTSUM)/3600,2),0) ACTUALS , NULL HG_HAS_CHILDRENFROM PRTASK TSKLEFT JOIN PRASSIGNMENT PRA ON PRA.PRTASKID = TSK.PRIDWHERE TSK.PRPROJECTID = @WHERE:PARAM:USER_DEF:STRING:HG_ROW_ID@GROUP BY TSK.PRID, TSK.PRNAME, TSK.PRSTART, TSK.PRFINISH

For the children we are going to bring in tasksand there corresponding actuals

Null because there aren’t any children

Parent is sending INV_INVESTMENTS.IDWe are going to link it to each tasks PRPROJECTIDNow it’s only bringing back corresponding tasks for each project

27 Clarity Educational Community

How it worksHierarchical Portlet

Project

Tasks

Project has children

Used in second query, to find the projects corresponding tasks

28 Clarity Educational Community

Putting it all togetherHierarchical Portlet

We are going to union the project and task sections inside the NSQL

SELECT @SELECT:DIM:USER_DEF:IMPLIED:ACTUALS:PRID:PRID@, ,@SELECT:DIM_PROP:USER_DEF:IMPLIED:ACTUALS:NAME:NAME@ ,@SELECT:DIM_PROP:USER_DEF:IMPLIED:ACTUALS:SCHEDULE_START:SCHEDULE_START@ ,@SELECT:DIM_PROP:USER_DEF:IMPLIED:ACTUALS:SCHEDULE_FINISH:SCHEDULE_FINISH@ ,@SELECT:DIM_PROP:USER_DEF:IMPLIED:ACTUALS:HG_HAS_CHILDREN:HG_HAS_CHILDREN@ ,@SELECT:METRIC:USER_DEF:IMPLIED:ACTUALS:ACTUALS@FROM( PROJECT QUERY UNION TASK QUERY) WHERE @FILTER@

29 Clarity Educational Community

Creating QueryHierarchical Portlet

Administration -> Queries Click New

Enter “Query Name” and “Query ID”Click “Save and Continue”

30 Clarity Educational Community

Creating QueryHierarchical Portlet

Delete old and paste new query here

Click “Save and Continue”

31 Clarity Educational Community

Creating QueryHierarchical Portlet

No need to change anything here

32 Clarity Educational Community

Creating PortletHierarchical Portlet

Administration -> Portlets Click NewClick “Grid Portlet”

Enter “Portlet Name”And “Portlet ID”

Browse for Query

Click Next

33 Clarity Educational Community

Creating PortletHierarchical Portlet

Click “Finish and Open”

Click “List Column Section”And Layout

34 Clarity Educational Community

Creating PortletHierarchical Portlet

Changes

Click Save

35 Clarity Educational Community

Create PortletHierarchical Portlet

Click “List Column Section”And Fields

Rename the columns

Click Save

36 Clarity Educational Community

Creating PortletHierarchical Portlet

Add to a page, and view all of your hard work!

37 Clarity Educational Community

Questions

Phone888.813.0444

Emailinfo@regouniversity.com

Websitewww.regouniversity.com

We hope that you found this session informative and worthwhile. Our primary goal was to increase your understanding of the topic and CA PPM in general.

There were many concepts covered during the session, if you would like to contact any presenter with questions, please reach out to us.

Thank you for attending regoUniversity 2015!