Keeping Leading Zeros in excel/CSV by peoplecode

Keeping Leading Zeros in excel/CSV by peoplecode

Keeping Leading Zeros in excel/CSV by peoplecode in app engine or AE. You can use below sql code before write file in peoplecode.

This syntax for convert number to text for solve issue leading zeros

‘=””‘|| REPORTS_TO ||'””‘ 

 

e.g.   select jb.emplid  ,’=”‘||jb.reports_to||'”‘ from ps_job jb

 

Ref: https://it.toolbox.com/question/writing-data-into-csv-file-through-app-engine-peoplecode-100112
Ref:http://www.compshack.com/peoplecode/leading-zero-issue-csvexcel-formatterd-report

How to use Update/ DisplayAll, Correction mode in Component Action

How to use Update/ DisplayAll, Correction mode in Component Action

How to use Update/ DisplayAll, Correction mode in Component Action.

Component Action : Update
– Shows Current and Future
– Allows changes to Current
– Allows changes to Future

Component Action:  Update/ Display All
– Shows History, Current, and Future
– Allows changes to Current
– Allows changes to Future

Component Action: Correction
– Shows History, Current, and Future
– Allows changes to History
– Allows changes to Current
– Allows changes to Future

Actions Detail

Add

Select to add a new high-level key, such as a new employee ID or customer. Except in the case of effective dating, use Add to insert a new current row or to update future rows.

Update/Display

Select to update existing rows only.

Update/Display All

Select to update current and future rows in an effective-dated record. Use only with effective-dated records. Do not use these actions unless the main record that is associated with the page definitions is effective dated. This information is translated to include history at runtime.

Correction

Select to update any rows (history, current, and future) in an effective-dated record. Use only with effective-dated records. This information is translated to correct history at runtime.

 

Ref: https://docs.oracle.com/cd/E24150_01/pt851h2/eng/psbooks/tapd/chapter.htm?File=tapd/htm/tapd15.htm
Ref:https://it.toolbox.com/question/what-is-the-use-update-displayall-correction-mode-in-component-action-092214

Differences Between Transfer and TransferExact in PeopleSoft

Differences Between Transfer and TransferExact in PeopleSoft

What are differences Between Transfer and TransferExact in PeopleSoft.

When you do a transfer, the first thing the system checks is whether all the key field values for the target component are provided.

If all the keys aren’t provided, the search page is displayed. In this scenario, TransferExact and Transfer are the same.

If all the keys are provided, a Select is done against the search record for that component using those keys.

  • If you use the Transfer function, a LIKE operator is used in the Where clause of that Select for each key.

  • If you use the TransferExact function, the equals operator is used in the Where clause for each key. Using equals allows the database to take full advantage of key indexes for maximum performance.

Example Code

 

Ref:https://docs.oracle.com/cd/E80738_01/pt854pbh2/eng/pt/tpcl/langref_PeopleCodeBuilt-inFunctionsAndLanguageConstructs_T.html#topofpage

Bypass Search page in a Component

Bypass Search page in a Component

Bypass Search page in a Component

1. You can use function peoplecode setsearchdialogbehavior(0)  at searchinit keyfield for bypass search record.

  • setsearchdialogbehavior(0)  for skip if possible search record
  • setsearchdialogbehavior(1)  for force display search record

2. Use search record is INSTALLATIION

or use record no search key or Derived/Work record

 

More detail about search record dialog box of the component

Force Search Processing 

  • If select the Checkbox then even if the above conditions are true, the system will always display the search dialog box.
  • Clear Checkbox Force Search Processing (The Default is cleared)
  1. If all required keys have been provided (either by system defaults or by PeopleCode).
  2. If this an Add dialog box, then no “duplicate key error” results from the provided keys; if this error occurs, the processing resets to the default behavior.
  3. If this is a Search dialog box, then at least one row is returned based on the provided keys.

 

Reference: http://peoplesoftexperts.blogspot.com/2006/01/how-to-skip-search-dialog-box_04.html

how to bypass search page using peoplecode

how to bypass search page using PeopleCode

how to bypass search page using peoplecode

1. You can use function peoplecode setsearchdialogbehavior(0)  at searchinit keyfield for bypass search record.

2. Use search record is INSTALLATIION

Different between dosave and dosavenow in peoplecode

Different between dosave and dosavenow in peoplecode

Different between dosave and dosavenow in peoplecode function of peoplesoft.

Dosave =

For example 1 PeopleCode:

PeopleCode Statment 1
PeopleCode Statment 2
Dosave() / Dovenow()
PeopleCode Statment 3

In case of Dosave function PeopleCode Statment 1 to PeopleCode Statment 2  will execute then save processing will trigger and DoSave can be used only in FieldEdit, FieldChange, or MenuItemSelected PeopleCode.

And in case of DosaveNow function PeopleCode Statment to PeopleCode Statment 2 will execute then save processing will trigger and rest PeopleCode Statment 3 will execute after save. Save processing (including SaveEdit, SavePreChange, SavePostChange, and Workflow PeopleCode)

More Detail

Do savenow()–>save the current field/component immediately..

Example 2: in the main page having some fields
1. emplid
2. status
3. rccode
4. deptid
…etc

when you are enter first field value as 100 and immediately tab out of that field, 100 value saved in database. when you are writing dosavenow() function in field edit event.

do save() —> save the current component..just like clicking on save button…
Example 3: when you enter all field values in the page finally click on save button, that time only those values saved in database.

When you use save button instead save of component then peoplecode both set component changed and do save in field change event.

setcomponetchanged();
dosave ();

 

Ref: https://it.toolbox.com/question/dosave-and-dosavenow-090607
Ref: https://docs.oracle.com/cd/E13292_01/pt849pbr0/eng/psbooks/tpcl/chapter.htm?File=tpcl/htm/tpcl02.htm
Ref: http://www.compshack.com/forum/peoplesoft/peoplesoft-technical/difference-between-do-save-and-do-save-now-functions-peoplecod

How to transfer a page from one component to a page in another component

How to transfer a page from one component to a page in another component

How to transfer a page from one component to a page in another component by peoplecode function in peoplesoft

Transfer function for transfer page from one page to the other page in difference component/ current component.
Syntax of transfer
Transfer(new_instance, MENUNAME.menuname, BARNAME.barname, ITEMNAME.menu_itemname, PAGE.component_item_name, action [, keylist] [, AutoSearch]);

Example : Transfer(true, MENUNAME.ADMINISTER_PERSONNEL, BARNAME.USE, ITEMNAME. PERSONAL_DATA, PAGE.PERSONAL_DATA_1, “U”);

TransferExact(new_instance, MENUNAME.menuname, BARNAME.barname, ITEMNAME.menu_itemname, PAGE.component_item_name, action [, keylist] [, AutoSearch])

For example PeopleCode

 

Use the TransferExact function to close the current page and transfers the user to another page, either within the current component or in another component. TransferExact can either start a new instance of the application and transfer to the new page there, or close the old page and transfer to the new one in the same instance of PeopleTools.

Ref:https://docs.oracle.com/cd/E80738_01/pt854pbh2/eng/pt/tpcl/langref_PeopleCodeBuilt-inFunctionsAndLanguageConstructs_T.html#topofpage

How to find Filed data length in PeopleCode

How to find Filed data length in PeopleCode

How to find Filed data length in PeopleCode function of PeopleSoft. You can Len(record.field) function of PeopleCode.

Example: Len(Record.Descr254)

You can use this code for requirement such as

if  Len(Record.Descr254) >  254 then

winmessage(‘Please input text data less than 254 or equal 254’,0);

end-if;

Difference between transfer and transferpage in PeopleSoft

Difference between transfer and transferpage in PeopleSoft

Difference between transfer and transferpage in PeopleSoft by PeopleCode language is function transfer page for each purpose.

TransferPage (): For transfer page from one page to the other page within a component.
Syntax of TransferPage
TransferPage([PAGE.page_name_name])
Example: TransferPage(PAGE.JOB_DATA);

Transfer(): For transfer page from one page to the other page in difference component/ current component.
Syntax of transfer
Transfer(new_instance, MENUNAME.menuname, BARNAME.barname, ITEMNAME.menu_itemname, PAGE.component_item_name, action [, keylist] [, AutoSearch]);

Example : Transfer(true, MENUNAME.ADMINISTER_PERSONNEL, BARNAME.USE, ITEMNAME. PERSONAL_DATA, PAGE.PERSONAL_DATA_1, “U”);

new_instance =  true = new window, false= current window.

You can find menu name, bar name, item name and  component_item_name  by select data in table PSAUTHITEM

Action =  A –Add,  U-update, L-Update/display, C-Correction, E-Data Entry

AutoSearch = Specify whether an automatic search on the target search page is executed after the transfer. This means the search results are already shown without the end-user having to click the Search button.
True=  an automatic search.
False = User has to click the search button.

 

Ref: http://peoplesoftismail.blogspot.com/p/normal-0-false-false-false-en-us-x-none_5886.htm

Ref: https://docs.oracle.com/cd/E13292_01/pt849pbr0/eng/psbooks/tpcl/chapter.htm?File=tpcl/htm/tpcl02.htm

How To Find and Change Current Style Sheet in PeopleSoft

How To Find and Change Current Style Sheet in PeopleSoft

How To Find and Change Current Style Sheet in PeopleSoft. If you change or check name of default style sheet font in PeopleSoft then you go to menu : PeopleTools > Utilities > Administration > PeopleTools Options

Default Style Sheet Name


Default Style Sheet for different Application Version.
Version 9.0 and earlier = PSSTYLEDEF
Version 9.1 = PSSTYLEDEF_SWAN
Version 9.2 = PSSTYLEDEF_TANGERINE

System Options for default style sheet name. 

Select the system options and defaults. Most of the values can be overridden by the registry options, and by the defined collection.

Menu : PeopleTools > Portal > Portal Utilities > System Options

Registry Options 

Select the registry specific options and defaults. These values will override the defined system options. Most of the values can be overridden by a defined collection. When adding the registry options, the values have initially defaulted on the system options. Click ‘Delete Registry Override’ to revert to the system defaults for the selected registry.

Menu : PeopleTools > Portal > Portal Utlities > Registry Options

And use this SQL for check default style sheet

SELECT STYLESHEETNAME FROM PSOPTIONS;

If you want to change style sheet name, you need to go to each of the above navigation and change the value of style sheet name and clear cache of ppp and web server for changes to take effect.

Ref:http://peoplesofttutorial.com/how-to-find-and-change-current-style-sheet-in-peoplesoft/