Skip to content

Instantly share code, notes, and snippets.

View kbens's full-sized avatar
🟦

Kyle Benson kbens

🟦
View GitHub Profile
@kbens
kbens / Number to String [peoplecode]
Last active March 20, 2017 20:44
String Manipulation in PeopleCode
Local number &Num = 2;
Local string &NumAsString = NumberToString("%03",&Num);
/* &NumAsString will now equal "002" */
@kbens
kbens / Substring [peoplecode]
Last active August 14, 2020 15:12
String Manipulation in PeopleCode
Local string &foo = "This is a foo string.";
Local string &start_key = "Th";
Local string &end_key = ".";
Local integer &start_pos = Find(&start_key, &foo) + Len(&start_key);
Local integer &end_pos = Find(&end_key, &foo);
Local string &result = Substring(&foo, &start_pos, &end_pos - &start_pos);
/* &result will now equal "is is a foo string" */
@kbens
kbens / Application Package [peoplecode]
Last active August 29, 2015 13:59
PeopleCode Example
import C_APP_PACK:FooClass;
Local C_APP_PACK:FooClass &foo;
&foo = create C_APP_PACK:FooClass();
&result = &foo.ExampleMethod(&bar);
@kbens
kbens / Function [peoplecode]
Created April 11, 2014 14:10
PeopleCode Example
Declare Function MY_FUNC PeopleCode MY_FUNC.FIELD FieldFormula;
@kbens
kbens / SQL Class [peoplecode]
Created April 11, 2014 14:11
PeopleCode Example
Local Record &rRecord = CreateRecord(Record.RECORD);
Local SQL &SQL = CreateSQL("SELECT * FROM PS_RECORD");
While &SQL.Fetch(&rRecord)
/**/
End-While;
@kbens
kbens / Process Sched Parameters
Last active August 29, 2015 13:59
PeopleSoft Process Definition File Dependency
/* Process Sched Parameters */
SELECT prcsinstance,
prcsfilename
FROM psprcsparms
ORDER BY prcsinstance DESC
@kbens
kbens / sp-wiki-toc.css
Last active August 29, 2015 14:01
sp-wiki-toc
/* Style wiki-toc */
#toc-list{
border: 1px black dashed;
background-color: whitesmoke;
float: left;
padding: 10px;
padding-top: 0px;
list-style-type: none; }
.toc{ }
.toc-H1{
/* Toggle Login */
function hideLogin(isHidden) {
if (isHidden) {
document.getElementById('loginbox').style.display = "none";
} else {
document.getElementById('loginbox').style.display = "block";
}
}
/* define a handler */
<html>
<head>
<script type="text/javascript" src="ps-hide-signin.js"></script>
</head>
<!-- Set custom property `login.isLoginHidden=true` in your web profile -->
<body onLoad="hideLogin(<%=login.isLoginHidden%>);">
<h1>The system is down for maintenance.</h1>
<h3>Click in this box, then use backdoor key. [Ctrl+Space]</h3>
<div id="loginbox">
<div>User
###############################################################
# psconfig.[$ENV].sh
# Script to set environment variables for an environment
###############################################################
# Environment name
ENV=fdev
# PS Homes
export PS_CFG_HOME=/opt/pscfg/$ENV