oracle sql case

oracle sql case

oracle sql case or case statement in sql

 

Refresh Page PeopleCode

Refresh Page PeopleCode

How to Refresh Page PeopleCode after save or equal to F5.

1. You can use this PeopleCode after saving at last statement. This code refreshes the whole your page.

            GetLevel0().Refresh(); 

2. Using Java Script

2.1 You Create HTML object for replace java script code is name = PAGE_LOAD

2.2 Define code to record filed HTML

DERIVED_TBL.HTMLAREA.Value = GetHTMLText(HTML.PAGE_LOAD)

2.3 Using Meta HTML TEXT at below

How to use Meta HTML PeopleSoft

How to Check Number/ Letter Peoplecode

How to Check Number/ Letter Peoplecode

How to Check Number/ Letter Peoplecode function from input value. You can use this peoplecode function at below.

 

 

Reference :http://www.compshack.com/peoplecode/peoplecode-check-number-and-check-letter-functions#comment-4979

 

How to access related field on grid by peoplecode

How to access related field on grid by peoplecode

How to access related field on grid by peoplecode of peoplesoft.

My requirement:

How to access related field DESCR100 of table CNTRC_TRAN and field EMPLID3 in all row of grid.

 

 

How to Disable Grid Column using Page Field Name Peoplecode

How to Disable Grid Column using Page Field Name Peoplecode

How to Disable Grid Column using Page Field Name Peoplecode. You can use disable of grid column using page Field Name for define value and access page field name by Peoplecode of Peoplesoft.

Assuming the grid’s Page Field Name value is “GRID_NAME” and the column’s Page Field Name value is “LINK” , you can use the following code

GetGrid(Page.STUD_AD_SP, “ADM_VW”).LINK.Visible = False;

If many requirement about grid such as user want to change column label name by condition automatically. You can coding from below link.

How to Change Grid Column Name of Grid/Scroll level 1 in Peoplecode Dynamically

How to access related field on grid by peoplecode

How to Change Grid Column Name of Grid/Scroll level 1 in Peoplecode

how to convert string to date peoplesoft

How to convert string to date peoplesoft

How to convert string to date peoplesoft using function peoplecode.

You can convert string to date by peoplecode using Datevalue().

DateValue(date_str)

Using DateValue function to convert a date string and returns the result as a Date type. date_str must be a string in the active date format user’s current personalization date format.

Example

&Currentdate = DateValue(’14/09/2018′);

&Currentdate= Date value.

 

 

Reference:

https://docs.oracle.com/cd/E41633_01/pt853pbh1/eng/pt/tpcl/langref_PeopleCodeBuilt-inFunctionsandLanguageConstructs-073e6a.html#DateValue-073de2

peoplecode last day of month

peoplecode last day of month

peoplecode last day of month using function last_day of sql and using sqlexec of peoplecode for select last day of month

Using SQL

select last_day(add_months((sysdate),0)) from dual;

Using Peoplecode

Sqlexec(“select last_day(add_months((sysdate),0)) from dual”,&last_day_of_month);

add months to date in peoplecode

add months to date in peoplecode

add months to date in peoplecode using function is AddToDate of PeopleSoft. This function to add the specified number of years, months, and days to the date provided.

Syntax: AddToDate(date, num_years, num_months, num_days)

Example add date forward 2 year, 6 months.

&result_dt = 03/03/2021

References:

http://peoplesoft.wikidot.com/addtodate
https://docs.oracle.com/cd/E13292_01/pt849pbr0/eng/psbooks/tpcl/book.htm?File=tpcl/htm/tpcl02.htm#H2001