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 '%[...]%';
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%'
--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);
.....
&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)
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
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
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
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.
Saturday, May 2, 2009
SQL PeopleCode requirment for long field
If the long field is not enclosed within %TextIn, then the SQL will work with long field values up to 255 characters long. Anything over that will cause a "Fatal SQL error has occurred" message to pop up - so it's hard to pick up in testing.
INSERT INTO PS_SOME_RECORD(EMPLID
, LONG_FIELD1
, LONG_FIELD2)
VALUES (:1
,%TextIn(:2)
,%TextIn(:3))
INSERT INTO PS_SOME_RECORD(EMPLID
, LONG_FIELD1
, LONG_FIELD2)
VALUES (:1
,%TextIn(:2)
,%TextIn(:3))
Subscribe to:
Posts (Atom)