How to Skip a Search Record Prompt When You Know the keys

How to Skip a Search Record Prompt When You Know the keys

You have two settings to choose from: skip if possible (0) and force display (1).

If you use the skip if possible setting, then you need to have the keys. Assume your
keys are EMPLID, EMPL_RCD, and EFFDT. Here is what the SearchInit PeopleCode
would look like:

SetSearchDialogBehavior(0);
EMPLID = %EmployeeID;
EMPL_RCD = 0;
EFFDT = &DateVariable;

How to Access a field in level 2 grid in a page using people code

How to Access a field in level 2 grid in a page using people code
If you have a page which has level 0 record and a level 1 scroll area .The level 1 scroll area has level 1 and level 2 grids in it, to access a field in the level 2 grid, you need to access the level 1 grid first and then only the level 2 grid field can be accessed, since the level 2 grid cannot be accessed directly . It cannot be accessed even through the scroll area since the whole scroll act as a row and for a level 0 parent row, there can be any number of scroll level data.
/*level 1 scroll : SCROLL_1 (Page field name)

level 1 record : REC_LEVEL1

level 2 record : REC_LEVEL2
*/

local rowset &Rs1, &Rs2;

&Rs1 = GetLevel0()(1).GetRowset(Scroll.REC_LEVEL1);

For &i = 1 To &Rs1.ActiveRowCount
   &Rs2 = &Rs1.GetRow(&i).GetRowset(Scroll.REC_LEVEL2);
   For &j = 1 To &Rs2.ActiveRowCount
    
         &Rs2(&j).ANY_RECORD_IN_LEVEL2.CORRESPONDING_FIELD.Value = *****

****************************
/*DO THE REQUIRED PROCESSING */
****************************

    End-For;
End-For;

How Sheduling SQR using Peoplecode

How Sheduling SQR using Peoplecode
Description
Structured Query Report (SQR) can be executed with the help of peoplecode without taking the user to Process request page. The best way to do it is to create a process request and schedule it.
The Steps Include 1)Declare a ProcessRequest object 2)Declare name of the sqr to be processed 3)Create a Process Request Object; 4)Set Properties of the Process Request Object 5)Schedule the SQR 6)If the Process (job) not scheduled, do error processing Problem this asset addresses In order to execute a Structured Query Report (SQR) , one has to go to the corresponding Process Request Page and run the SQR manually.This manual work is cumbersome and the user has to wait to execute the SQR at predefined time intervals
 
/* Declare a ProcessRequest object */
Local ProcessRequest &PRCSRQST; 

/* Declare name of the sqr FEB_PRCS to be processed */
Local String &SQR_TO_PROCESS; 

&SQR_TO_PROCESS = "FEB_PRCS"
/* Create a Process Request Object; */
&PRCSRQST = CreateProcessRequest("SQR Process", &SQR_TO_PROCESS);

/* Set Properties of the Process Request Object; */
REM CreateProccessRequest function takes these 2 arguments - Process Type and the Process Name;

&PRCSRQST.RunControlID = "FEB07";
&PRCSRQST.SetOutputOption("Web", "PDF", "", &SQR_TO_PROCESS); 

/* Schedule the SQR */
&PRCSRQST.Schedule();
If &PRCSRQST.Status = 0 then
/* Schedule successful. */
Else
/* Process (job) not scheduled, do error processing */

End-If;

How to pass Dynamic Drop Down Value using peoplecode

How to pass Dynamic Drop Down Value using peoplecode
PeopleSoft provides the functions ClearDropDownList & AddDropDownItem to solve the problem defined above. Certain points to be noted:

1. The variable type (here &fld_TypeField_l) should be Field .

2. If the drop down box has been cleared using ClearDropDownList and subsequently NO AddDropDownItem function call has been used, all the default translate value descriptions will be displayed .

3. The format of AddDropDownItem is &Field_Variabe.AddDropDownItem('A', 'Approved'). Always note that the codes used in AddDropDownItem (here 'A')should be the same codes used in the translate .

/*** VARIABLE DECLARATIONS ****/
Local Field &fld_TypeField_l;

/*** GET THE FIELD ***/
&fld_TypeField_l = GetField(IMF_PAY_MSG_MST.ACTION_TYPE);

/*** CLERING THE DROP DOWN VALUE ****/
&fld_TypeField_l.ClearDropDownList();

/*** ADDING THE VALUES IN DROP DOWN ****/
&fld_TypeField_l.AddDropDownItem('A', 'Approved'); 
&fld_TypeField_l.AddDropDownItem('C', 'Cancelled'); 
&fld_TypeField_l.AddDropDownItem('P', 'Pending'); 
&fld_TypeField_l.AddDropDownItem('O', 'On-Hold'); 
&fld_TypeField_l.AddDropDownItem('R', 'Rejected');



App Designer Tutorial

What is an application designer? Application Designer is an integrated development environment that enables you to work with the numerous objects of a business application in a single work area.

Features in App Designer
Multiple Document interface Drag and Drop Pop - up Menus Property sheets Dynamic tool bars and Menus    Application designer Components


Steps to Designing an Application. 1)Design the Application 2)Define new Fields 3)Create the Record Definition 4)Build the Record 5)Create Page Definition 6)Define the Component 7)Create the Menu Definition 8)Enable Security 9)Test the Application. Important Points to Remember in App Designer.Field Individual pieces of data—such as an employee ID—that can be entered by the user and stored in the database or a column on a table or in a view. Field is column in a table or Record. What is Record?
All the data that resides in PeopleSoft applications is stored in tables, or records, as part of a relational database system. Each record definition describes the properties of an underlying SQL table.
Record is a collection of Fields
What is Page?
Pages provide a way to enter, view, and edit data online
Collection of records.
What is Component?
Represents a logical business transaction or a set of logically related pages that are processed together. collection of pages
What is Menu?
Enables access to the components you build, along with the pages contained in the components
Collection of Components What is Project? A user-defined collection of related object definitions created for the purpose of developing, customizing, or upgrading a PeopleSoft application.
SQL Can be entire SQL programs, or just fragments of SQL statements that you want to re-use.
Style Sheet
A collection of styles that can be used by Internet Architecture application pages.
Activity
A map showing the individual steps, events, and routings that comprise a complete activity within a business process.
Application Engine
A program comprising SQL statements and PeopleCode programs to be run in batch mode, as an alternative to using COBOL
File Layout Definition (or mapping) of a file to be processed. It identifies where in a file data fields are located. Component Interface Externalizes access to a component, so it can be used by a third party or an application message
Start the Development by:
1.Create a new project(Optional). File>New>Project
2. Set Project Options(Optional). Tools>Options
3. Name and save the Project(Optional). File>Save Project As

Hiding Group Boxes on Peoplesoft Pages

Hiding Group Boxes on Peoplesoft Pages
however if the requirement is to selectively display group box in case a particular condition is true or in case for a particular employee or role, you can display the group box by the below code:

if ASGN_VW.EMPLID = "101" Then

DERIVED_HR.AB_PLAN_GRPBOX.Visible = False;

Else

DERIVED_HR.AB_PLAN_GRPBOX.Visible = True;

End-If;