Sunday, 22 July 2012


Creating structure (columns) from other table:   

To get only structure not data use below SQL

CREATE TABLE new_table
  AS (SELECT * FROM old_table WHERE 1=2)

 If you want data also

CREATE TABLE new_table
  AS (SELECT * FROM old_table)

Friday, 20 July 2012

Clicking of push button XL to CI :


Some times we will get requirement like this in a page click of push button is mandatory, so if you create XL to CI to the you have to include that push button field in that CI, then in  XL to CI give input as ‘Y’ so it’ll work

Thursday, 19 July 2012

Warning: Application Engine Request is not active -- processing suspended (108,517):

 Some times when we try to schedule an application engine through AE it gives above error. & the process goes into success. It actually does not execute the application engine
  
 you have to  set the process frequency to "Always" in below page and then schedule process

Home > PeopleTools > Application Engine > Process > Request

 

Friday, 13 July 2012

Enable and Disable add and delete Buttons in Scroll:


 To enable and disable add/delete button using people code

Example With bit logic
 Local Rowset &PCS_CMP_HDR;
 & CMP_HDR = GetLevel0()(1).GetRowset(Scroll.PER_ROL_REC);
If &CMP_HDR(CurrentRowNumber()).PER_ROL_REC.WF_STATUS.Value = "A" Then
   &CMP_HDR.InsertEnabled = True;
Else
   &CMP_HDR.InsertEnabled = True;
End-If;

In front end  also you can do
1.


2.

Note:
 
In Scroll if all field all fields display only automatically add/deletions will become display only
to avoid this you have to make put at least one filed in editable and make visible property false

Monday, 11 June 2012

Writing Inline Queries using PS Query Tool

To achive this we can use SQL objects
appdesigner create SQL object with in line select statement
use this SQL as exprestion in PSQuery
click on Add Expresstion


In Expresstion test place give SQL(Name of SQL Object) like ( %SQL(V_TEST))

click on save and then click on use it as field


Monday, 28 May 2012

Finding Duplicates in a Record

  select p.emplid, p.expiratn_dt from sysadm.ps_CITIZEN_PSSPRT P where
p.expiratn_dt=(select max(expiratn_dt) from sysadm.ps_CITIZEN_PSSPRT  where emplid=p.emplid) GROUP by p.emplid,p.expiratn_dt
HAVING COUNT(emplid)>1

  Change above SQL based on your requirement

Tuesday, 15 May 2012

Data Buffer Classes
In PeopleCode there are four data buffer classes
  1. Rowset Class
  2. Row Class
  3. Record Class
  4. Field Class
Order of these classes will be
Rowset > Row > Record > Field 

Ex:

 Standard form

Local  RowSet  &Rs0,&Rs1,&Rs2;
Local Row        &Row0,&Row1,&Row2;
Local Record   &Rec0,&Rec1,&Rec2;
Local Filed       &Field,&Field2;


&Rs0 = GetLevel0();
&Row0 = &Rs0.GetRow(1);
&Rs1 = &Row0.GetRowset(Scroll.Z_CLASS);
&Row1 = &Rs1.GetRow(2);
&Rs2 = &Row1.GetRowset(Scroll.Z_SECTION_REC);
&Row2 = &Rs2.GetRow(3);
&Rs3 = &Row2.GetRowset(Scroll.Z_STUDENT_REC);
&Row3 = &Rs3.GetRow(3);
&Rec2 = &Row3.GetRecord(Record.Z_STUDENT_REC);
rem &Row2=&Rec1.GetRow(3);
&Field2 = &Rec2.GetField(Field.NAME);
rem &Row3=&Field1.GetRow(3);
WinMessage(&Field2.Value);

Short form
&RQ_Lvl0 = GetLevel0();
   &RQ_Lvl1 = &RQ_Lvl0(1).GetRowset(Scroll.HRS_JO_RQMT);
   &RQ_Lvl1(1).HRS_JO_RQMT.SAL_ADMIN_PLAN.Value = &SAL_ADMIN_PLAN;