Professional Documents
Culture Documents
While at work today I discovered that there doesnt appear to be any built in functionality to allow
for a delay to be implemented within PeopleCode. Thankfully there are a couple of roundabout
way you can go about doing this:
#1: Works if you are sitting on an Oracle DB
/* The following code creates a 5 second delay using DBMS_LOCK.SLEEP */
&s = 5;
SQLExec("exec DBMS_LOCK.SLEEP(:1)", &s);
I came across a requirement today where I needed to find out when a user had last logged into
PeopleSoft. The record PSACCESSLOG came in handy here, it stores all of the following:
PSACCESSLOG
OPRID: The users operator ID
LOGIPADDRESS: The users IP address
LOGINDTTM: A timestamp showing when the user logged in
LOGOUTDTTM: A timestamp showing when the user logged out
PT_SIGNON_TYPE: The signon type
Find Last Login Date for User:
SELECT *
FROM PSACCESSLOG
WHERE oprid = '<OPERATOR ID>'
ORDER BY effdt DESC;
http://psjose.blogspot.in/2013/01/jquerymobil
e-calendar-on-peoplesoft-pia.html
http://ps.mytechspeak.com/2012/07/s
o-need-is-calendar-view.html
http://danielkibler.blogspot.in/2010/10
/using-jquery-in-peoplesoftintroduction.html
How to Create Calendar using jQuery
and CSS3
Valeriu Timbuc CSS3, jQuery, Tutorials April 4, 2012 11 Comments
<div id="calendar"></div>
Then before the body closing tag we need to add the jQuery and the jQuery UI script.
We also need to call the datepicker, so you need to use the same id that youve used
on the div. We will also add some options: the inline will make the calendar visible, so we
dont need to click on a button or input; to make Monday the first day on the calendar
we need to set it to 1; show other months will add the others months days in order to fill
all the table. For more info about all the options available read thedocumentation.
1
2
3
4
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></s
<script src="js/jquery-ui-datepicker.min.js"></script>
<script>
$('#calendar').datepicker({
inline: true,
firstDay: 1,
showOtherMonths: true,
9
10
});
</script>
Step 2 Container
Lets start by removing all the margins, paddings, borders, etc.
1
.ui-datepicker,
.ui-datepicker table,
.ui-datepicker tr,
.ui-datepicker td,
.ui-datepicker th {
margin: 0;
padding: 0;
border: none;
border-spacing: 0;
10
Then we will style the calendar container. Lets add a background color, rounded corners
and shadows. We will also change the text font to Tahoma and the text size.
1
.ui-datepicker {
display: none;
width: 294px;
padding: 35px;
cursor: default;
6
7
text-transform: uppercase;
font-family: Tahoma;
font-size: 12px;
10
background: #141517;
11
12
13
-webkit-border-radius: 3px;
14
-moz-border-radius: 3px;
border-radius: 3px;
15
16
-webkit-box-shadow: 0px 1px 1px rgba(255,255,255, .1), inset 0px 1px 1px rgb(0,0,
17
-moz-box-shadow: 0px 1px 1px rgba(255,255,255, .1), inset 0px 1px 1px rgb(0,0,0);
18
box-shadow: 0px 1px 1px rgba(255,255,255, .1), inset 0px 1px 1px rgb(0,0,0);
19
20
Step 3 Header
To style the header of the calendar (month and year) we will change the text colors, add
a border bottom and some more basic styles.
1
.ui-datepicker-header {
position: relative;
padding-bottom: 10px;
6
7
8
9
.ui-datepicker-month {
position: relative;
10
padding-right: 15px;
11
12
color: #565656;
}
13
14
.ui-datepicker-year {
15
padding-left: 8px;
16
color: #a8a8a8;
17
18
To add the green circle we will use the :before pseudo selector. This will allow us to
insert content before the month element and then we will style and position it.
1
2
.ui-datepicker-month:before {
display: block;
position: absolute;
top: 5px;
right: 0;
width: 5px;
height: 5px;
content: '';
9
10
background: #a5cd4e;
11
12
13
14
15
16
17
-webkit-border-radius: 5px;
18
-moz-border-radius: 5px;
19
border-radius: 5px;
20
21
.ui-datepicker-prev,
.ui-datepicker-next {
position: absolute;
top: -2px;
padding: 5px;
cursor: pointer;
6
7
8
.ui-datepicker-prev {
left: 0;
10
11
padding-left: 0;
}
12
13
.ui-datepicker-next {
14
right: 0;
15
padding-right: 0;
16
17
18
19
.ui-datepicker-prev span,
20
.ui-datepicker-next span{
display: block;
21
width: 5px;
22
height: 10px;
23
text-indent: -9999px;
24
25
26
background-image: url(../img/arrows.png);
}
27
28
29
30
31
32
33
34
35
.ui-datepicker-calendar th {
padding-top: 15px;
padding-bottom: 10px;
4
5
text-align: center;
font-weight: normal;
color: #a8a8a8;
Then we will style the days grid by adding some paddings, changing the colors and we
will add a transparent border to each number. This is needed because we will add a
border to the active number so to avoid it to jump when we click on a number we need to
add this transparent border.
1
.ui-datepicker-calendar td {
padding: 0 7px;
2
3
4
text-align: center;
line-height: 26px;
7
8
9
10
11
12
.ui-datepicker-calendar .ui-state-default {
display: block;
width: 26px;
outline: none;
13
text-decoration: none;
14
color: #a8a8a8;
15
border: 1px solid transparent;
16
}
17
For the active state we will change the text and border color to green. For the other
months days we will change the color to a darker one.
1
.ui-datepicker-calendar .ui-state-active {
color: #6a9113;
5
6
Conclusion
We finished our calendar. If you have any question let me know in the comments. Also
dont forget to leave some feedback and share it with your friends. Follow us if you want
to be the first to know about the latest tutorials and articles.
Expert entry enables a user to change from interactive to deferred mode at runtime for
appropriate transactions.
Note. Expert entry should be used only by expert users of the transaction who understand
how all of the fields in the transaction behave. It requires the user to know the exact
keystroke sequence for the transaction. This sequence typically varies for a transaction by
customer, depending on the customer's setup and entry requirements. Therefore, expert entry
should not be used by occasional users, because they might not be aware of the nuances of
the transaction and when it is necessary to press the Refresh hot key.
To use expert entry, select:
The Allow Expert Entry check box on the Internet tab of the Component Properties
dialog box.
If these check boxes are selected, an Expert Entry check box appears on the bottom of the
page at runtime. If the user selects this check box, the transaction runs in deferred mode,
regardless of the setting on the component, page, or field property.
When you set the component property to deferred mode, that component operates in deferred
mode processing for all users, not just those who have expert entry enabled in their profiles.
If you want the component to process in deferred mode for some users and interactive mode
for other users:
This enables security user profiles to control the users for whom deferred mode processing is
possible.
Warning! Users who modify component properties from interactive mode to deferred mode
or select the Allow Expert Entry check box should understand that this is an adaptation of the
software, and, as such, they are responsible for thoroughly testing and supporting this change.
Refresh Button
The Expert Entry feature enables you to specify whether a Refresh button should be included
on the component toolbar when the page is displayed. The Refresh button forces a
transmission to the server to determine which fields have changed since the last transmission
to the server and to run any processing logic that is associated with those changes.
Users can also refresh by pressing the Alt+0 hot key, which keeps the cursor in the same field
when the page is refreshed. One can refresh any time during data entry to enable an expert
user to:
Update related display field values for the data that is already entered.
Provide defaults based on prior data that was entered on the page.
Validate the data that has been entered on the page so far.
Invoke the code to hide or gray items associated with specific fields.
The user must click the Refresh button after entering a value in a field that is
associated with PeopleCode associated that hides, unhides, grays, or ungrays
other fields on the same page.
Drop-down The user must click the Refresh button after entering a value in a field that is a
list box
high-order key that is used to control the values in a drop-down list box.
Default
values
Whenever expert entry is properly enabled and selected by the user at runtime,
the transaction runs in deferred mode. As such, defaults, totals, balances, and
related displays are not updated until the next transmission to the application
server (for example, when the user clicks a button, icon, link, or another tab).
If the user wants the page updated before then, the user must click the Refresh
button.
To have the Expert Entry check box appear in the component at runtime, the security
administrator must enable it in Security. This enables the Expert Entry check box to appear in
any components for which you select the Allow Expert Entry property on the Internet tab of
the Component Properties dialog box.
To enable expert entry through Security:
1. Sign in to the PeopleSoft system in your browser.
2. Select PeopleTools, Security, Use, User Profiles.
3. Select the General tab.
4. Select Enable Expert Entry in the General Attributes group box.
5. Click Save.
Standard properties
Createkeyinfocollection
Getkeyinfocollection field properties.
User-Defined properties
Developer can further control the exposed
Findkeyinfocollection
Property Info collection
GetHistoryItems (Update/Display mode or
Correction mode)
EditHistory Items
InteractiveMode
What is the difference between exit(0),exit(1) when we are using this functions in
AE
Exit (1) causes immediate termination of a PeopleCode program. Use this parameter to rollback
database changes. Go to the next Step or if that is the last step then return back to the calling Section.
Exit (0) caused immediate termination of a Peoplecode Program but dont make rollback in the
database. Go to the next action.
Select/Fetch
2)
Reselect
3)
Restart able
Select/Fetch: Opens the cursor only at the first time and retrieve rows one at loop.
Commits inside the step (commits in the Called Section) are ignored if AE is Restart enabled.
Reselect: It opens the cursor and closes the cursor on each iteration of the loop.
It will reselect the same row of data.
Logic in Actions of the step should be such that it will be changing the status of the rows in the table
the do select is selecting.
Commits are not ignored and will be committed in a reselect loop when the restart is enabled.
Restart able: - similar to select/Fetch but it WILL COMMIT inside the loop thus allowing the
checkpoint to the PS_AERUNCONTROL table.
determines if it meets a given criteria, if so, apply rule x to row Update row, commit. With set
processing, you only select those rows that meet the filtering criteria and then run the rule once again
all the affected rows.
For details between set based and parallel processing, visit here.
What are the 3 common ways to pass a trace parameter and value to your
program psae.exe?
Configuration manager,
Process Definition,
Command prompt.
Which Trace option is the best place to start for general performance
information?
-
What are the 3 trace parameters you can pass to your psae.exe?
-
PS Query is user friendly (at least for developers ) to pull out and see data
residing in database tables. Usually business users are given access to PS Query
components to create and view new/existing queries. These data they will be
able to be downloaded to their system in different formats. This posses a critical
risk on your sensitive data. Displaying or exposing data to a wrong set of users is
a real threat and if sometimes auditors will catch it, it can affect your company
certification as well other than the data exposure threat.
PeopleSoft has provided 3 different levels of control to restrict your data to only
the right set of users. I will try to provide a brief idea on the various security
levels available for PS Queries.
1.
Component Security
You will get delivered Query Manager, Query Viewer and Schedule Query
components with your application package. Not all of your business users may
need to access data other than from the transaction components. Usually very
few core business users would need transaction datas that need to be exported
and processed further. So restrict the access to these components via permission
list and assign the permission list to only the right set of users. This should be
your first level of security to prevent the data explosion risk.
2.
a.
b.
c.
d.
e.
Go To: PeopleTools > Security > Query Security > Query Access Manager. Open
a query tree corresponding to your module. If it doesnt exists, go ahead and
create one.
Add your record as a node to the tree and save.
Now you should associate the Query Tree with a permission list. For that open
the permission list (People Tools > Security > Permission & Roles > Permission
List) and go to the Query Tab.
Click on the Access Group Permissions and provide your Tree and Branch names
and save it.
Assign the permission list to a role and the role to a user.
With the above steps you have successfully provided the second level security
for the data, i.e individual record level security.
3.
Implementing the above will put in place most of the security to the data that
you require. But there are some cases where you want to add more security. As
per the setting above, the user has full data access to the records assigned to
the query security tree. But what about the data inside the record? Consider the
case of HRMS where you have sensitive data. For example take the
PERSONAL_DATA record. The user getting access to other peoples personal
details is not acceptable. To overcome this situation PeopleSoft has delivered the
third layer of security via Query Security Records also called as row level
security. Query security records are views which will select the data from the
base table and also adds additional where clause to restrict the data fetched.
You can follow the below steps to implement row level security for PS Query
output.
a.
b.
c.
Create a view which fetches the desired data from the base table
Add all the keys of underlying record to the view
Add one more additional key from OPRID, OPRCLASS & ROWSECCLASS.
PeopleSoft will automatically create the where clause for this extra field.
d. Now add the record created to the Query Security Record field of the underlying
records property in the Use tab. PeopleSoft will automatically join this record with
the underlying record when the Query is executed. You can verify the same by
looking at the SQL statement of the PS Query.
Once you have done with these three steps, you are done with all the three layers of
security. Want more? Do you want to hide the data based on values of multiple
columns? As per my best knowledge there are no other options now. You can
leave the comments, if you know some methods. Otherwise lets wait until
People Tools brings up row level security to multiple fields.
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 fuction, 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.
Transfer
Syntax
Transfer(new_instance,
MENUNAME.menuname,
BARNAME.barname,
ITEMNAME.menu_itemname,
PAGE.component_item_name,
action [, keylist] [, AutoSearch]);
Use the Transfer function to close the current page and transfers the end-user to another page, either
within the current component or in another component. Transfer 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.
Transfer is more powerful than the simpler TransferPage, which permits a transfer only within the
current component in the current instance of PeopleTools. However, any variables declared as
Component do not remain defined after using the Transfer function, whether youre transferring
within the same component or not.
You can use Transfer from a secondary page (either with or without using a pop-up menu) only if
youre transferring to a separate instance of a component. You cannot use Transfer from a secondary
page if youre not transferring to a separate instance of a component.
new_instance
Menuname
The name of the menu where the page is located prefixed with the reserved
word MENUNAME.
Barname
The name of the menu bar where the page is located, prefixed with the
reserved word BARNAME.
menu_itemname
The name of the menu item where the page is located, prefixed with the
reserved word ITEMNAME.
component_item_name The component item name of the page to be displayed on top of the
component when it displays. The component item name is specified in the
component definition. This parameter must be prefixed with the keyword
PAGE.
Action
Uses a single-character code as in %Action. Valid actions are "A" ( add), "U"
(update), "L" (update/display all), "C" (correction), and "E" (data entry).
Keylist
An optional list of field specifications used to select a unique row at level zero
in the page you are transferring to, by matching keys in the page you are
transferring from. It can also be an already instantiated record object.
If a record object is specified, any field of that record object that is also a
field of the search record for the destination component is added to keylist.
The keys in the fieldlist must uniquely identify a row in the "to" page search
record. If a unique row is not identified, or if Force Search Processing is
selected for the component, the search dialog box appears.
If the keylist parameter is not supplied then the destination component's
search key must be found as part of the source components level 0 record
buffer.
AutoSearch
Returns
None.
Example
The example starts a new instance of PeopleTools and transfers to a new page in Update mode. The
data in the new page is selected by matching the EMPLID field from the old page.
Transfer(true, MENUNAME.ADMINISTER_PERSONNEL, BARNAME.USE, ITEMNAME.
PERSONAL_DATA, PAGE.PERSONAL_DATA_1, "U");
TransferExact
Syntax
TransferExact(new_instance,
MENUNAME.menuname,
BARNAME.barname,
ITEMNAME.menu_itemname,
PAGE.component_item_name,
action [, keylist] [, AutoSearch]);
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.
TransferExact is more powerful than the simpler TransferPage, which permits a transfer only within
the current component in the current instance of PeopleTools. However, any variables declared as
Component do not remain defined after using the TransferExact function, whether youre transferring
within the same component or not.
You can use TransferExact from a secondary page (either with or without using a pop-up menu) only
if youre transferring to a separate instance of a component. You cannot use TransferExact from a
secondary page if youre not transferring to a separate instance of a component.
Example
The example starts a new instance of PeopleTools and transfers to a new page in Update mode. The
data in the new page is selected by matching the EMPLID field from the old page.
TransferExact(true, MENUNAME.ADMINISTER_PERSONNEL, BARNAME.USE,
ITEMNAME.PERSONAL_DATA, PAGE.PERSONAL_DATA_1, "U");
Note. You cant use TransferPage from a secondary page. Any variable declared as a Component
variable will still be defined after using a TransferPage function.
- level Specifies the level of the scroll level on the parent page that contains the row corresponding to
level 0 on the secondary page.
scrollpath A construction that specifies a scroll level in the component buffer.
- target_row The row number of the row in the parent page corresponding to the level 0 row in the
secondary page.
Restrictions on Use in PeopleCode Events
Control does not return to the line after DoModal until after the user has dismissed the secondary
page. This interruption of processing makes DoModal a "think-time" function, which means that it
shouldn?t be used in any of the following PeopleCode events:
? SavePreChange
? SavePostChange
? Workflow
? RowSelect
? Any PeopleCode event that fires as a result of a ScrollSelect, ScrollSelectNew, RowScrollSelect or
RowScrollSelectNew function call.
Restrictions on Use with a Component Interface
This function can?t be used by a PeopleCode program that?s been called by a Component Interface.
You should put a condition around this function, testing whether there?s an existing Component
Interface or not.
If %CompIntfcName Then
/* process is being called from a Component Interface */
/* do CI specific processing */
Else
/* do regular processing */
...
End-if;
Example
DoModal(PAGE.EDUCATION_DTL, MsgGetText(1000, 167, "Education Details - %1",
EDUCATN.DEGREE), - 1, - 1, 1, RECORD.EDUCATN, CurrentRowNumber());
Use the DoModalComponent function to launch a modal component. The modal component launches
from within an originating component. After the modal component displays, the user cant proceed
with changes to the originating component until either accepting or canceling the modal component.
Essentially, you are requesting a specific page on a component to be opened from an existing
component say on a click of a button. So you need another component defined with a page that you
want opened when the method is invoked.
Subpages becomes part of a page and do not have an identity of its own. Generally, all the fields on a
sub page are part of a sub record.For e.g. an address subpage.
Secondard pages generally are placed on the Page itself and opened up when the user clicks a link
button on a page on when the seondard page is placed. one could use a do modal to open a secondard
page. Generally used when, real estate on a page is insufficient and you want to move some fields
generally not touched by users on s separate secondary page.
I sugguest you try to create pages, components etc and you will get an idea of what is happening. Just
reading peoplebooks will not help.
Part of it is because of how Peoplebooks is organized.
For e.g. all the function are organized alphabetically and just reading a function in isolation will not be
be very helpful. ( unfortunately. )
Maybe start building simple pages and components . For the issue at hand, creat 2 components with
pages attached to each andthe call domodalComponent from one. Try calling a sub page or a
secondard page using the function and you will know why that function cannot be used.
The IsModal function returns True if executed from PeopleCode running in a modal secondary page
and False if executed elsewhere. This function is useful in separating secondary page-specific logic
from general PeopleCode logic.