Adding Common Attributes to Effective Dated Tables

When adding a SCC_CAF_LAUNCH_SBP subpage to an effective dated table, you must add a PeopleCode snippet that ensures copying of forward field values onto a new effective dated row, when a new row is inserted into the scroll area.

Using PeopleCode to copy forward default values

The following code samples illustrate the enabling of the copy forward of values onto a newly inserted effective dated row, using either inline code or an application class. While both options deliver the same result, you may select the code which provides you with the smaller footprint.

Inline Code example

The following inline code example uses the Academic Structure, Academic Plan Table ACAD_PLAN_TBL record and page.

On the SCC_CAF_LAUNCH_SBP subpage, in the RowInsert event of the CAF-enabled record, set the RowInserted property to True. We recommend you add the following inline code in the Component Record PeopleCode:

import SCC_COMMON_ATTRIBUTE_FW:Components:SCC_CAF_LAUNCH_SBP;
Component SCC_COMMON_ATTRIBUTE_FW:Components:SCC_CAF_LAUNCH_SBP &pop;
&pop.RowInserted = True;

This example illustrates using inline code on the SCC_CAF_LAUNCH_SBP subpage.

SCC_CAF_LAUNCH_SBP- inline code example

Application Class Code Example

On the SCC_CAF_LAUNCH_SBP subpage, in the RowInsert event of the CAF-enabled record, set the RowInserted property to True. We recommend this method if other Component PeopleCode has been administered or is to be administered in a dedicated Application Class.

  1. Set the RowInserted property by adding a new method to either to an existing application class or to a new application class. In this example, the method is added to SSR_COMMON_UTILITIES:COMPONENTS.

    import SCC_COMMON_ATTRIBUTE_FW:Components:SCC_CAF_LAUNCH_SBP;
    Class ACAD_PLAN_TBL
    Method ACAD_PLAN_TBL_RowInsert();
    End-class;
    
    Component SCC_COMMON_ATTRIBUTE_FW:Components:SCC_CAF_LAUNCH_SBP &pop;
    method ACAD_PLAN_TBL_RowInsert
    &pop.RowInserted = True;
    end-method;

    This example illustrates using application class code on the SCC_CAF_LAUNCH_SBP subpage.

    SCC_CAF_LAUNCH_SBP- application class code example (1 of 2)
  2. Call the new method in the record’s RowInsert event.

    import SSR_COMMON_UTILITIES:Components:ACAD_PLAN_TBL;
    Component SSR_COMMON_UTILITIES:Components:ACAD_PLAN_TBL &acadPlan;
    &acadPlan.ACAD_PLAN_TBL_RowInsert();
    

    This example illustrates using application class code on the SCC_CAF_LAUNCH_SBP subpage.

    SCC_CAF_LAUNCH_SBP- application class code example (2 of 2)