Monday, December 15, 2014

Keep leading zero in csv format:

Keep leading zero in csv format:
' ",=" '   
$BU_NUM
' "          

Thursday, May 15, 2014

How to place trace directly in PeopleCode

How to place trace directly in PeopleCode: SetTracePC(2048); SetTraceSQL(7);

Monday, June 3, 2013

looking for text in message catalog & text catalog

select * from PS_HR_SSTEXT_TEXT where HR_SSTEXT_TEXT like '%[...]%';


select * from PSMSGCATDEFN where descrlong like '%[...]%';

Tuesday, December 4, 2012

Text could be found in one of these:

--message catalog
select descrlong from PSMSGCATDEFN where descrlong like '%appropriate action%'



-- message text
select hr_sstext_text from ps_HR_SSTEXT_TEXT where hr_sstext_text like '%appropriate action%'


-- workflow template
select WL_TEMPLATE_ID from ps_WL_TEMPLATE_GEN where WL_MSG_TXT like '%appropriate action%'

Thursday, September 22, 2011

Transfer to the portal folder

Declare Function NavPageURL PeopleCode EOPP_SCRTN_WRK.FUNCLIB FieldFormula;
.....
&LINKURL = NavPageURL
("EMPLOYEE", "HRMS", "Folder_Name", "PSC", "", "", "False", "", "", "");
%Response.RedirectURL(&LINKURL);

Monday, October 25, 2010

Remove tags from comment field

Use REGEXP_REPLACE(X.COMMENTS,'<[^<>]*>','') to remove tags like below:

SELECT
A.HRS_JOB_OPENING_ID,
A.CLOSE_DT,
A.STATUS_REASON,
,X.COMMENTS
,REGEXP_REPLACE(X.COMMENTS,'<[^<>]*>','')
FROM PS_HRS_JOB_OPENING A, PS_HRS_OPNAPR_XREF X
WHERE A.HRS_JOB_OPENING_ID = X.HRS_JOB_OPENING_ID
AND A.STATUS_REASON <> ''

In addition, you could explore these two functions:
1) htf.escape_sc(x.comments)
2) dbms_xmlgen.convert(x.comments)

Wednesday, July 14, 2010

Make Page View Only

GetPage(Page.MY_PAGE1).DisplayOnly = True;

Verify / match role or permission list.

IsUserInRole(rolename1 [, rolename2]. . .)
IsUserInPermissionList(PermissionList1)
It could be used with NOT function
if not(IsUserInRole("ADMIN")then
Hide(Field);
end-if

PeopleCode (String to number)

Thiscode help to cmpare string to number
Value(LTrim(&SAL_RANGE_MAX_RATE))> 100

Thursday, May 21, 2009

users are able to update their own data

According to PeopleBooks.."By default, the Component Processor does not allow an user to make any changes to a record if a record contains an EMPLID key field and its value matches the value of the user's EMPLID" . Function AllowEmplIdChg(true) should be used in order to allow users to update their own data.