Escolar Documentos
Profissional Documentos
Cultura Documentos
Purpose
The purpose of this document is to illustrate how to integrate Population Selection into custom processes.
The following conventions where used in the PeopleCode sections to indicate changes that must be made
to work with the custom process.
Add the subrecord SCCPS_RCNTL_SBR to your run control record below OPRID and RUN_CNTL_ID
Add the following Component PeopleCode
{Component}.GBL.SCCPS_DERIVED.ATTACHADD.FieldChange – No Changes
import SCC_POP_SELECT:PIAComponents:PopSelectController;
import SCC_POP_SELECT:UTIL:EXCEPTION:*;
try
&PopController.FieldChangeAdd();
{Component}.GBL.SCCPS_DERIVED.ATTACHDELETE.FieldChange – No Changes
import SCC_POP_SELECT:PIAComponents:PopSelectController;
import SCC_POP_SELECT:UTIL:EXCEPTION:*;
try
&PopController.FieldChangeDelete();
{Component}.GBL.SCCPS_DERIVED.ATTACHVIEW.FieldChange – No Changes
import SCC_POP_SELECT:PIAComponents:PopSelectController;
import SCC_POP_SELECT:UTIL:EXCEPTION:*;
try
&PopController.FieldChangeView();
import SCC_POP_SELECT:PIAComponents:PopSelectController;
import SCC_POP_SELECT:UTIL:EXCEPTION:*;
try
&PopController.FieldChangeParameters();
{Component}.GBL.SCCPS_DERIVED.SCCPS_RESULTS_URL.FieldChange – No Changes
import SCC_POP_SELECT:PIAComponents:PopSelectController;
import SCC_POP_SELECT:UTIL:EXCEPTION:*;
try
&PopController.FieldChangePreViewResults();
{Component}.GBL.SCCPS_DERIVED.SCCPS_RUN.FieldChange – No Changes
import SCC_POP_SELECT:PIAComponents:PopSelectController;
&PopController.FieldChangeExecuteToRecord();
{Component}.GBL.SCCPS_DERIVED.SCCPS_TOOL_URL.FieldChange – No Changes
import SCC_POP_SELECT:PIAComponents:PopSelectController;
import SCC_POP_SELECT:UTIL:EXCEPTION:*;
try
&PopController.FieldChangeToolURL();
import SCC_POP_SELECT:PIAComponents:PopSelectController;
import SCC_POP_SELECT:MODEL:ContextMapping:ContextMapper;
import SCC_POP_SELECT:UTIL:EXCEPTION:*;
try
/* Use the ContextMapper to get the context id. In this case it depends on the
navigation - menu, component */
Local SCC_POP_SELECT:MODEL:ContextMapping:ContextMapper &ContextMapper = create
SCC_POP_SELECT:MODEL:ContextMapping:ContextMapper();
{RUNCONTROLRECORD}.SCCPS_CNTXT_ID = &ContextMapper.NavigationToContextID(%Menu,
%Component);
If {RUNCONTROLRECORD}.SCCPS_CNTXT_ID = 0 Then
MessageBox(0, "", 14015, 21, "Unable to Locate Population Selection Context
for this component", %Menu, %Component);
End-If;
/* Create the controller class and pass references to the required pop select
fields
These include the Tool ID, Context ID, Selection Name, etc */
&PopController = create
SCC_POP_SELECT:PIAComponents:PopSelectController(GetRecord(Record.{RUNCONTROLRECORD
}), GetRecord(Record.SCCPS_DERIVED), %OperatorId, {RUNCONTROLRECORD}.RUN_CNTL_ID);
&PopController.SetLaunchToolField(GetRecord(Record.SCCPS_DERIVED).GetField(Field.SC
CPS_TOOL_URL));
&PopController.SetPreViewResultsFields(GetRecord(Record.SCCPS_DERIVED).GetField(Fie
ld.SCCPS_RESULTS_URL),
GetRecord(Record.SCCPS_DERIVED).GetField(Field.SCCPS_HTMLAREA));
/* Finally call the row init method, this will set the field visiblity,
enablement, etc. */
&PopController.RowInit();
import SCC_POP_SELECT:UTIL:EXCEPTION:*;
import SCC_POP_SELECT:PIAComponents:PopSelectController;
End-If;
If None({RUNCONTROLRECORD}.SCCPS_CNTXT_ID) Then
Error MsgGet(14015, 14, "Message not found.");
End-If;
{Component}.GBL.{RunControlRecord}.SavePreChange – No Changes
import SCC_POP_SELECT:PIAComponents:PopSelectController;
import SCC_POP_SELECT:UTIL:EXCEPTION:*;
import SCC_POP_SELECT:PIAComponents:PopSelectController;
import SCC_POP_SELECT:MODEL:ContextMapping:ContextMapper;
import SCC_POP_SELECT:UTIL:EXCEPTION:*;
try
/* Use the ContextMapper to get the context id. In this case it depends on the
navigation - menu, component */
Local SCC_POP_SELECT:MODEL:ContextMapping:ContextMapper &ContextMapper = create
SCC_POP_SELECT:MODEL:ContextMapping:ContextMapper();
{RUNCONTROLRECORD}.SCCPS_CNTXT_ID = &ContextMapper.NavigationToContextID(%Menu,
%Component);
If {RUNCONTROLRECORD}.SCCPS_CNTXT_ID = 0 Then
MessageBox(0, "", 14015, 21, "Unable to Locate Population Selection Context
for this component", %Menu, %Component);
End-If;
/* Create the controller class and pass references to the required pop select
fields
These include the Tool ID, Context ID, Selection Name, etc */
&PopController = create
SCC_POP_SELECT:PIAComponents:PopSelectController(GetRecord(Record.
{RUNCONTROLRECORD}), GetRecord(Record.SCCPS_DERIVED), %OperatorId,
NYU_FIN_CLR_RST.RUN_CNTL_ID);
&PopController.SetLaunchToolField(GetRecord(Record.SCCPS_DERIVED).GetField(Field.SC
CPS_TOOL_URL));
&PopController.SetPreViewResultsFields(GetRecord(Record.SCCPS_DERIVED).GetField(Fie
ld.SCCPS_RESULTS_URL),
GetRecord(Record.SCCPS_DERIVED).GetField(Field.SCCPS_HTMLAREA));
/* Finally call the row init method, this will set the field visiblity,
enablement, etc. */
&PopController.RowInit();
import SCC_POP_SELECT:PIAComponents:PopSelectController;
import SCC_POP_SELECT:UTIL:EXCEPTION:*;
try
&PopController.FieldChangeFilePath();
{Component}.GBL.{RunControlRecord}.SCCPS_POP_SEL.FieldChange – No Changes
import SCC_POP_SELECT:PIAComponents:PopSelectController;
import SCC_POP_SELECT:UTIL:EXCEPTION:*;
try
&PopController.FieldChangePopSelection();
{Component}.GBL.{RunControlRecord}.SCCPS_QUERY_NAME.FieldChange – No Changes
import SCC_POP_SELECT:PIAComponents:PopSelectController;
import SCC_POP_SELECT:UTIL:EXCEPTION:*;
try
&PopController.FieldChangeQueryName();
{Component}.GBL.{RunControlRecord}.SCCPS_TOOL_ID.FieldChange – No Changes
import SCC_POP_SELECT:PIAComponents:PopSelectController;
import SCC_POP_SELECT:UTIL:EXCEPTION:*;
try
&PopController.FieldChangeToolID();