peoplecode events pdf
peoplecode events pdf of peoplesoft component processor flow.
Reference: http://www.aaronwhincop.com/wp-content/uploads/2013/02/PeopleSoft-Component-Processor-Flow.pdf
Peoplesoft
PeopleSoft had an HR Application (HCM) and a Financial Application (FCM) and a CRM application and Student application (Campus Solutions).
peoplecode events pdf of peoplesoft component processor flow.
Reference: http://www.aaronwhincop.com/wp-content/uploads/2013/02/PeopleSoft-Component-Processor-Flow.pdf
PeopleSoft Component Processor Flow
Reference: http://peoplesoftcomponentprocessorflowchart.blogspot.com/2011/08/peoplesoft-componet-processor-flow.html
You can using split function in peoplecode of peoplesoft. This function to convert a string into an array of strings by looking for the string separator in the given string but this function does not split an array.
Split(string, separator)
If separator is omitted, a blank is used.
If separator is a null string (“”), the string is split into single characters.
If separator is the last character in the string, you will not get an empty string.
For example 1, in the following code, &array only has a value of 2:
&test = “value1:value2:”;
&array = Split(&test, “:”);
For example 2, you can get file and read file.
If &In_File.IsOpen Then
While &In_File.ReadLine(&file);
&line = Split(&file, “,”);
MessageBox(0, “Lenght of separate , in file”, 0, 0, ” i len= ” | &line.Len);
End-while;
End-if;
Reference: https://docs.oracle.com/cd/E13292_01/pt849pbr0/eng/psbooks/tpcl/chapter.htm?File=tpcl/htm/tpcl02.htm
How to Remove Carriage Returns (CR) in peoplecode of peoplesoft. Using peoplecode function is clean() for remove all non-printable characters.
Syntax of clean: Clean(string)
You can use the clean function to remove all non-printable characters, such as control codes, end of line marks, and unpaired Unicode combining marks, from a text string and returns the result as a String value. It is intended for use on text imported from other applications that contains characters that may not be printable. Frequently, low-level characters appear at the beginning and end of each line of imported data, and they cannot be printed.
Returns
Returns a String value purged of non-printable characters.
Example 1
Because Char(7) (U+0007) is a non-printable character, the following Clean function returns a null string:
&CLEANSTR = Clean(Char(7));
Reference: https://docs.oracle.com/cd/E13292_01/pt849pbr0/eng/psbooks/tpcl/chapter.htm?File=tpcl/htm/tpcl02.htm
Different substitute and replace peoplecode function of peoplesoft.
Use the Substitute function to replace every occurrence of a substring found in a string with a new substring. To replace text that occurs in a specific location in a text string using the Replace function.
The syntax of Substitute:
Substitute(source_text, old_text, new_text)
source_text is a string in which you want to replace substrings.
old_text is a string equal to the substring of source_text you want to replace.
For example 1
Substitute(“2003* 0723* * * * ~”, “* ~”, “~”);
The result: 2003~0723~~~~~
Replace function to replace a specified number of characters in a string.
Syntax: Replace(old_text, start, num_chars, new_text)
old_text: A String value, part of which is to be replaced.
start: A Number designating the position in old_text from which to start replacing characters.
num_chars: A Number, specifying how many characters to replace in old_text.
new_text: A String value that replaces num_chars characters.
For example 2
Replace(“2000″,3,2,”18”);
The result of example 2 is 2018
For example 3
Replace(“MeeToo”,4,3,”kkk”);
The result of example 2 is Meekkk
Reference: https://docs.oracle.com/cd/E13292_01/pt849pbr0/eng/psbooks/tpcl/chapter.htm?File=tpcl/htm/tpcl02.htm%23g037ee99c9453fb39_ef90c_10c791ddc07__3c34
Reference: https://docs.oracle.com/cd/E13292_01/pt849pbr0/eng/psbooks/tpcl/chapter.htm?File=tpcl/htm/tpcl02.htm%23g037ee99c9453fb39_ef90c_10c791ddc07__3c34
How to Get Current Row Number in a Grid or Scroll Area by peoplecode function of PeopleSoft. The CurrentRowNumber function returns the current row on level one, or the parent row of the level two row where the PeopleCode program is executing.
Using function peopolecode is currentrownumber(scrolllevel);
This PeopleCode get value current row number in a grid or scroll by level.
if your grid or scroll area is @level 1 then use Currentrownumber(1) method spell.
if your grid or scroll area is @level 2 then use Currentrownumber(2) method spell.
For example 1. I have scrollarea level 1 on page and show row number of record in scroll area level 1 by peoplecode at below picture.
You define field number or character and replace peoplecode in rowinit event of this field.
DERIVED.SEQ.value = CurrentRowNumber(1);
——————————————————————————————————————–
Using Peoplecode for rearrange row equal rownum of grid area
Local Rowset &LEVEL0, &LEVEL1;
If %Page = Page.TS_TRF_JOB_DATA Then
Local Row &LEVEL0_ROW;
&LEVEL0 = GetLevel0();
&LEVEL0_ROW = &LEVEL0(1);
&LEVEL1 = &LEVEL0_ROW.GetRowset(Scroll.TS_TRF_JOBDATA);
For &i = 1 To &LEVEL1.ActiveRowCount
&LEVEL1_ROW = &LEVEL1(&i);
&LEVEL1(&i).TS_TRF_JOBDATA.SEQ.Value = &i;
End-For;
End-If;
References:
How to find PeopleSoft Project Item List SQL in table PSPROJECTITEM.
This SQL for select all list your project in application designer (AE) such as sql table, sql view table, work record, sub record, dynamic view, query view, temp table, other record or deleted, index, field, page, menu, component.
SQL help you run a sql query to list all the objects in a project in application designer.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208 SELECT OBJECTTYPE,CASE OBJECTTYPEWHEN 0 THEN CASE NVL((SELECT RECTYPE FROM PSRECDEFN WHERE RECNAME = I.OBJECTVALUE1), 99)WHEN 0 THEN 'SQL Table in DB'WHEN 1 THEN 'SQL View in DB'WHEN 2 THEN 'Work Record'WHEN 3 THEN 'Sub Record'WHEN 5 THEN 'Dynamic View'WHEN 6 THEN 'Query View'WHEN 7 THEN 'Temporary Table'ELSE 'Other Record or Deleted' ENDWHEN 1 THEN 'Index'WHEN 2 THEN 'Field'WHEN 3 THEN 'Field Format'WHEN 4 THEN 'Translate Value'WHEN 5 THEN 'Page'WHEN 6 THEN 'Menu'WHEN 7 THEN 'Component'WHEN 8 THEN 'Record PeopleCode'WHEN 9 THEN 'Menu PeopleCode'WHEN 10 THEN 'Query'WHEN 11 THEN 'Tree Structure'WHEN 12 THEN 'Tree'WHEN 13 THEN 'Access Group'WHEN 14 THEN 'Color'WHEN 15 THEN 'Style'WHEN 16 THEN 'Business Process Map'WHEN 17 THEN 'Business Process'WHEN 18 THEN 'Activity'WHEN 19 THEN 'Role'WHEN 20 THEN 'Process Definition'WHEN 21 THEN 'Process Server Definition'WHEN 22 THEN 'Process Type Definition'WHEN 23 THEN 'Process Job Definition'WHEN 24 THEN 'Process Recurrence Definition'WHEN 25 THEN 'Message Catalog'WHEN 26 THEN 'Dimension'WHEN 27 THEN 'Cube Definition'WHEN 28 THEN 'Cube Instance Definition'WHEN 29 THEN 'Business Interlink'WHEN 30 THEN CASE OBJECTVALUE2WHEN '0' THEN 'SQL Object'WHEN '1' THEN 'App Engine SQL'WHEN '2' THEN 'Record View SQL'WHEN '5' THEN 'Query for DDAUDIT or SYSAUDIT'WHEN '6' THEN 'App Engine XML SQL'ELSE 'SQL' ENDWHEN 31 THEN 'File Layout'WHEN 32 THEN 'Component Interface'WHEN 33 THEN 'Application Engine Program'WHEN 34 THEN 'Application Engine Section'WHEN 35 THEN 'Message Node'WHEN 36 THEN 'Message Channel'WHEN 37 THEN 'Message'WHEN 38 THEN 'Approval rule set'WHEN 39 THEN 'Message PeopleCode'WHEN 40 THEN 'Subscription PeopleCode'WHEN 41 THEN 'N/A'WHEN 42 THEN 'Component Interface PeopleCode'WHEN 43 THEN 'Application Engine PeopleCode'WHEN 44 THEN 'Page PeopleCode'WHEN 45 THEN 'Page Field PeopleCode'WHEN 46 THEN 'Component PeopleCode'WHEN 47 THEN 'Component Record PeopleCode'WHEN 48 THEN 'Component Record Field PeopleCode'WHEN 49 THEN 'Image'WHEN 50 THEN 'Style sheet'WHEN 51 THEN 'HTML'WHEN 52 THEN 'Not used'WHEN 53 THEN 'Permission List'WHEN 54 THEN 'Portal Registry Definitions'WHEN 55 THEN 'Portal Registry Structure'WHEN 56 THEN 'URL Definitions'WHEN 57 THEN 'Application Packages'WHEN 58 THEN 'Application Package PeopleCode'WHEN 59 THEN 'Portal Registry User Homepage'WHEN 60 THEN 'Problem Type'WHEN 61 THEN 'Archive Templates'WHEN 62 THEN 'XSLT'WHEN 63 THEN 'Portal Registry User Favorite'WHEN 64 THEN 'Mobile Page'WHEN 65 THEN 'Relationships'WHEN 66 THEN 'Component Interface Property PeopleCode'WHEN 67 THEN 'Optimization Models'WHEN 68 THEN 'File References'WHEN 69 THEN 'File Type Codes'WHEN 70 THEN 'Archive Object Definitions'WHEN 71 THEN 'Archive Templates (Type 2)'WHEN 72 THEN 'Diagnostic Plug In'WHEN 73 THEN 'Analytic Model'WHEN 79 THEN 'Service'WHEN 80 THEN 'Service Operation'WHEN 81 THEN 'Service Operation Handler'WHEN 82 THEN 'Service Operation Version'WHEN 83 THEN 'Service Operation Routing'WHEN 84 THEN 'Info Broker Queues'WHEN 85 THEN 'XLMP Template Definition'WHEN 86 THEN 'XLMP Report Definition'WHEN 87 THEN 'XMLP File Definition'WHEN 88 THEN 'XMPL Data Source Definition'ELSE 'Unknown ' || OBJECTTYPE END AS Object_Type,CASE OBJECTTYPEWHEN 12 THEN OBJECTVALUE3WHEN 30 THEN CASE WHEN OBJECTVALUE2 = 0 THEN OBJECTVALUE1 /* SQL Object */WHEN OBJECTVALUE2 = 1 THEN SUBSTR(OBJECTVALUE1, 1, 12)WHEN OBJECTVALUE2 = 2 THEN OBJECTVALUE1 /* Record View SQL */ELSE ' ' ENDWHEN 34 THEN TRIM(OBJECTVALUE1) || '.' || TRIM(OBJECTVALUE2)WHEN 62 THEN TRIM(SUBSTR(OBJECTVALUE1, 1, 12))ELSE OBJECTVALUE1 END AS NAME,CASEWHEN OBJECTTYPE = 1 THEN 'Index: ' || OBJECTVALUE2WHEN OBJECTTYPE = 4 THEN 'XLAT: ' || OBJECTVALUE2 || '; Date: ' || OBJECTVALUE3 || '; ' ||NVL((SELECT 'ShortName: ' || XLATSHORTNAME || '; LongName: ' ||XLATLONGNAME || '; Status: ' || EFF_STATUSFROM PSXLATITEMWHERE FIELDNAME = I.OBJECTVALUE1 AND FIELDVALUE = I.OBJECTVALUE2AND EFFDT = TO_DATE(I.OBJECTVALUE3, 'YYYY-MM-DD')), 'XLAT Deleted')WHEN OBJECTTYPE = 7 THEN 'Market: ' || OBJECTVALUE2WHEN OBJECTTYPE = 8 THEN OBJECTVALUE1 || '.' || OBJECTVALUE2 || '.' || OBJECTVALUE3WHEN OBJECTTYPE = 9 THEN OBJECTVALUE2 || '.' || OBJECTVALUE3 || '.' || OBJECTVALUE4WHEN OBJECTTYPE = 12 THEN 'EFFDT: ' || OBJECTVALUE4WHEN OBJECTTYPE = 20 THEN 'Process Name: ' || OBJECTVALUE2WHEN OBJECTTYPE IN(22, 40) THEN OBJECTVALUE2 || '.' || OBJECTVALUE3WHEN OBJECTTYPE = 25 THEN 'Message: ' || OBJECTVALUE2 ||' (Message Set Descr: ' || OBJECTVALUE3 || ')'WHEN OBJECTTYPE = 30 THENCASE WHEN OBJECTVALUE2 = 0 THEN ' ' /* SQL Object */WHEN OBJECTVALUE2 = 1 THEN 'AE Progam: ' ||SUBSTR(OBJECTVALUE1, 1, 12) || ' Section: ' ||SUBSTR(I.OBJECTVALUE1, 13, 8) || ' Step: ' ||SUBSTR(OBJECTVALUE1, 21, 8) || ' Type: ' ||DECODE(SUBSTR(OBJECTVALUE1, 29, 1), 'S', 'SQL','D', 'Do Select', 'W', 'Do While','H', 'Do When', 'N', 'Do Until',SUBSTR(OBJECTVALUE1, 29, 1))WHEN OBJECTVALUE2 = 2 THEN ' ' /* Record View SQL */ELSE ' ' ENDWHEN OBJECTTYPE = 38 THEN 'EFFDT: ' || OBJECTVALUE2WHEN OBJECTTYPE IN(39, 42, 44) THEN OBJECTVALUE2WHEN OBJECTTYPE = 43 THENCASE WHEN TRIM(OBJECTVALUE4) = 'OnExecute' THEN'Section: ' || SUBSTR(I.OBJECTVALUE2, 1, 8) || '; Step: ' ||OBJECTVALUE3 || '; Market: ' || SUBSTR(I.OBJECTVALUE2, 9, 3) ||'; Database: ' || TRIM(SUBSTR(OBJECTVALUE2, 12, 8)) ||'; EFFDT: ' || TRIM(SUBSTR(OBJECTVALUE2, 21, 10))ELSE 'Section: ' || OBJECTVALUE2 || '; Market: ' || OBJECTVALUE3|| '; Database: ' || TRIM(SUBSTR(OBJECTVALUE4, 12, 8)) ||'; EFFDT: ' || TRIM(SUBSTR(OBJECTVALUE4, 21, 10)) ENDWHEN OBJECTTYPE = 46 THEN 'Market: ' || OBJECTVALUE2 || '; Event: ' || OBJECTVALUE3WHEN OBJECTTYPE = 47 THEN 'Market: ' || OBJECTVALUE2 || '; Record: ' || OBJECTVALUE3|| '; Event: ' || OBJECTVALUE4WHEN OBJECTTYPE = 48 THEN 'Market: ' || OBJECTVALUE2 || '; Record: ' || OBJECTVALUE3|| '; Field: ' || TRIM(SUBSTR(OBJECTVALUE4, 1, 18))|| '; Event: ' || TRIM(SUBSTR(OBJECTVALUE4, 19, 16))WHEN OBJECTTYPE = 55 THEN DECODE(OBJECTVALUE2, 'C', 'Content: ', 'F', 'Folder: ') || OBJECTVALUE3WHEN OBJECTTYPE = 57 THENCASE WHEN TRIM(OBJECTVALUE4) NOT IN(' ', ':', '.') THEN'Subclass: ' || TRIM(OBJECTVALUE2) || ':' || TRIM(OBJECTVALUE3)|| ':' || TRIM(OBJECTVALUE4)ELSECASE WHEN TRIM(OBJECTVALUE3) NOT IN(' ', ':', '.') THEN'Subclass: ' || TRIM(OBJECTVALUE2) || ':' ||TRIM(OBJECTVALUE3)ELSECASE WHEN TRIM(OBJECTVALUE2) NOT IN(' ', ':', '.') THEN'Subclass: ' || TRIM(OBJECTVALUE2)ELSE ' 'ENDENDENDWHEN OBJECTTYPE IN(58, 63, 68, 81, 82, 83, 87, 88) THENCASE WHEN TRIM(OBJECTVALUE4) IS NOT NULL THENTRIM(OBJECTVALUE2) || '.' || TRIM(OBJECTVALUE3) || '.'|| TRIM(OBJECTVALUE4)ELSECASE WHEN TRIM(OBJECTVALUE3) IS NOT NULL THENTRIM(OBJECTVALUE2) || '.' || TRIM(OBJECTVALUE3)ELSECASE WHEN TRIM(OBJECTVALUE2) IS NOT NULL THENTRIM(OBJECTVALUE2)ELSE ' 'ENDENDENDWHEN OBJECTTYPE = 59 THEN TRIM(OBJECTVALUE2)WHEN OBJECTTYPE = 62 THEN 'AE Progam: ' || SUBSTR(OBJECTVALUE1, 1, 12) || ' Section: ' ||SUBSTR(I.OBJECTVALUE1, 13, 8) || ' Step: ' ||SUBSTR(OBJECTVALUE1, 21, 8)ELSE ' ' END AS EXTENDED_OBJ_NAME,CASE OBJECTTYPEWHEN 0 THEN NVL((SELECT RECDESCR FROM PSRECDEFN WHERE RECNAME = I.OBJECTVALUE1), ' ')WHEN 1 THEN NVL((SELECT IDXCOMMENTS FROM PSINDEXDEFN WHERE RECNAME = I.OBJECTVALUE1AND INDEXID = I.OBJECTVALUE2), ' ')WHEN 3 THEN NVL((SELECT DESCR FROM PSFMTDEFN WHERE FORMATFAMILY = I.OBJECTVALUE1), ' ')WHEN 5 THEN NVL((SELECT DESCR FROM PSPNLDEFN WHERE PNLNAME = I.OBJECTVALUE1), ' ')WHEN 6 THEN NVL((SELECT DESCR FROM PSMENUDEFN WHERE MENUNAME = I.OBJECTVALUE1), ' ')WHEN 7 THEN NVL((SELECT DESCR FROM PSPNLGRPDEFN WHERE PNLGRPNAME = I.OBJECTVALUE1AND MARKET = I.OBJECTVALUE2), ' ')WHEN 20 THEN NVL((SELECT DESCR FROM PS_PRCSDEFN WHERE PRCSTYPE = I.OBJECTVALUE1AND PRCSNAME = I.OBJECTVALUE2), ' ')WHEN 32 THEN NVL((SELECT DESCR FROM PSBCDEFN WHERE BCNAME = I.OBJECTVALUE1), ' ')WHEN 33 THEN NVL((SELECT DESCR FROM PSAEAPPLDEFN WHERE AE_APPLID = I.OBJECTVALUE1), ' ')ELSE ' ' END AS DESCRFROM PSPROJECTITEM IWHERE PROJECTNAME ='<strong><em>PROJECT_NAME</em></strong>'ORDER BY OBJECTTYPE, 2, OBJECTVALUE1, OBJECTVALUE2, OBJECTVALUE3, OBJECTVALUE4;
Reference: http://peoplesofttutorial.com/sql-to-list-project-items-in-peoplesoft/
psxlatitem in peoplesoft is a table for store value of translate value of the field. psxlatitem has related language record is PSXLATITEMLANG and parent record is PSXLATDEFN.
You can select a value of translate value by using below code of PeopleCode.
SELECT XLATLONGNAME FROM PSXLATITEM WHERE FIELDNAME =’TYPE’ AND FIELDVALUE= ‘1’;
SELECT XLATLONGNAME FROM PSXLATITEMLANG WHERE FIELDNAME =’TYPE’ AND FIELDVALUE= ‘1’;
This section provides an overview of the Translate table and discusses how to:
Add values to the Translate table.
Change translate values.
Delete translate values.
Save the Translate table.
Reference: https://docs.oracle.com/cd/E57990_01/pt853pbh2/eng/pt/tapd/task_UsingtheTranslateTable-077674.html#topofpage
How to Hide/Unhide one option in Radio button PeopleSoft by using javascript.
For example. If you have 2 radio button on the page in Peoplesoft contain value Y and N but you want to hide a radio button has value Y.
1. Define Page Field Name of Radio Button Properties = RDO_Y
Result Page on Browser
2. Define JavaScript in HTML Area on page in application designer.
<script language=’javascript’>
document.getElementById(‘win0divRDO_Y$0′).style.display=’none’;
</script>
Result page in the browser after using javascript to hide a radio button when value Y is checked
You can find ID: win0divRDO_Y$0 by using right-click and inspect the radio button after the PeopleCode runs.
Another way: you can use a group box of each field radio button and using PeopleCode for hide or unhide radio button for your requirement.
How to use Rich Text Format in PeopleSoft in application designer.
You can input detail of requirement in record field long PeopleSoft.
1. Enable Rich Text of long field in application designer.
2. Save Detail
3. Use Detail of 2 by select long filed in the database and define value.
If &Datalong is data that select from your database.
Example: Record.Long_filed = &Datalong;