Wednesday, August 24, 2011

Run Process from hyperlink without code

The following steps help to run process from hyperlink or from push button without any code.

 clip_image002

clip_image002[11]

image

Friday, August 12, 2011

Link To Portal Folder

The below code can be used for a link to navigate to your portal folder.

Declare Function NavPageURL PeopleCode EOPP_SCRTN_WRK.FUNCLIB FieldFormula;

&LINKURL = NavPageURL(%Portal, %Node, "your-folder-object-name", "PSC", "", "", "False", "", "", "");
%Response.RedirectURL(&LINKURL);

Thursday, August 11, 2011

Objects that can't be copied through File

Following objects can’t be copied through Copy project to File option.

· Access Groups
· Trees
· Roles
· Message Catalog Entries

Sunday, August 7, 2011

SQL To find Who Modified PeopleCode

The below SQL helps to identify who modified PeopleCode.

SELECT objectvalue1 record_name, objectvalue2 field_name,
       objectvalue3 peoplecode_event, lastupddttm, lastupdoprid
  FROM pspcmprog
WHERE objectvalue1 = :record_name
   AND objectvalue2 = :field_name
   AND UPPER (objectvalue3) = UPPER (:peoplecode_event);

Thursday, August 4, 2011

Set the number of links available under a Portal folder

Navigate to PeopleTools > Portal > Portal Utilities > System Options and update "Maximum Columns" to 3.

image

Out Put:

image

Wednesday, August 3, 2011

Functions with EFFDT and EFFSEQ to get row

1. Obtain the row number of Prior Effective date row.  Does not use row with same date and sequence number as itself.

Function prior_effdt_row(&EFFDT, &EFFSEQ, &PRIORDT, &PRIORSEQ, &PRIOR_ROW);
&ACTIVE_ROW = ActiveRowCount(JOB.EMPLID);
For &I = 1 To &ACTIVE_ROW;
&FETCH_EFFDT = FetchValue(JOB.EFFDT, &I);
&FETCH_EFFSEQ = FetchValue(JOB.EFFSEQ, &I);
If (&FETCH_EFFDT < &EFFDT Or
(&FETCH_EFFDT = &EFFDT And
&FETCH_EFFSEQ < &EFFSEQ)) And
(&FETCH_EFFDT > &PRIORDT Or
(&FETCH_EFFDT = &PRIORDT And
&FETCH_EFFSEQ > &PRIORSEQ)) Then
&PRIORDT = &FETCH_EFFDT;
&PRIORSEQ = &FETCH_EFFSEQ;
&PRIOR_ROW = &I;
End-If;
End-For;
End-Function;

2. Obtain the row number of Prior Effective date row. If it finds row with same effdt and seq row that is not itself, it uses that row.


Function prior_same_effdt(&EFFDT, &EFFSEQ, &CURRENT_ROW, &PRIORDT, &PRIORSEQ, &PRIOR_ROW);
&ACTIVE_ROW = ActiveRowCount(JOB.EMPLID);
For &I = 1 To &ACTIVE_ROW;
&FETCH_EFFDT = FetchValue(JOB.EFFDT, &I);
&FETCH_EFFSEQ = FetchValue(JOB.EFFSEQ, &I);
If (&FETCH_EFFDT < &EFFDT Or
(&FETCH_EFFDT = &EFFDT And
&FETCH_EFFSEQ <= &EFFSEQ)) And
(&FETCH_EFFDT > &PRIORDT Or
(&FETCH_EFFDT = &PRIORDT And
&FETCH_EFFSEQ > &PRIORSEQ)) And
&CURRENT_ROW <> &I Then
&PRIORDT = &FETCH_EFFDT;
&PRIORSEQ = &FETCH_EFFSEQ;
&PRIOR_ROW = &I;
End-If;
End-For;
End-Function;



3. Obtain the row number of Next Effective date row


Function next_effdt_row(&EFFDT, &EFFSEQ, &NEXTDT, &NEXTSEQ, &NEXT_ROW);
&NEXTDT = Date(30001231);
&NEXTSEQ = 9;
&ACTIVE_ROW = ActiveRowCount(JOB.EMPLID);
For &I = 1 To &ACTIVE_ROW;
&FETCH_EFFDT = FetchValue(JOB.EFFDT, &I);
&FETCH_EFFSEQ = FetchValue(JOB.EFFSEQ, &I);
If (&FETCH_EFFDT > &EFFDT Or
(&FETCH_EFFDT = &EFFDT And
&FETCH_EFFSEQ > &EFFSEQ)) And
(&FETCH_EFFDT < &NEXTDT Or
(&FETCH_EFFDT = &NEXTDT And
&FETCH_EFFSEQ < &NEXTSEQ)) Then
&NEXTDT = &FETCH_EFFDT;
&NEXTSEQ = &FETCH_EFFSEQ;
&NEXT_ROW = &I;
End-If;
End-For;
End-Function;



4. Obtain the row number of First Effective date row.


Function first_effdt_row(&FIRSTDT, &FIRSTSEQ, &FIRST_ROW);
&FIRSTDT = Date(30001231);
&FIRSTSEQ = 9;
&ACTIVE_ROW = ActiveRowCount(JOB.EMPLID);
For &I = 1 To &ACTIVE_ROW
&FETCH_EFFDT = FetchValue(JOB.EFFDT, &I);
&FETCH_EFFSEQ = FetchValue(JOB.EFFSEQ, &I);
If (&FETCH_EFFDT < &FIRSTDT Or
(&FETCH_EFFDT = &FIRSTDT And
&FETCH_EFFSEQ < &FIRSTSEQ)) Then
&FIRSTDT = &FETCH_EFFDT;
&FIRSTSEQ = &FETCH_EFFSEQ;
&FIRST_ROW = &I;
End-If;
End-For;
End-Function;



5. Obtain the row number of row matching date and sequence.



Function det_effdt_row(&EFFDT, &EFFSEQ, &ROW);
   &ACTIVE_ROW = ActiveRowCount(JOB.EMPLID);
   For &I = 1 To &ACTIVE_ROW
      &FETCH_EFFDT = FetchValue(JOB.EFFDT, &I);
      &FETCH_EFFSEQ = FetchValue(JOB.EFFSEQ, &I);
      If &FETCH_EFFDT = &EFFDT And
            &FETCH_EFFSEQ = &EFFSEQ Then
         &ROW = &I;
         &I = &ACTIVE_ROW
      End-If;
   End-For;
End-Function;