You can use the AddToTime function to add hours, minutes, and/or
seconds to time. This function returns the result as a Time value. To
subtract from time, you can simply use negative numbers. The resulting
is always adjusted such that it represents an hour less than 24 (example: 18:45)
AddToTime(time, hours, minutes, seconds)
So, how does it look like using an example?
A very useful PeopleCode Meta-SQL function. I will be providing an
example and how %CurrentDateIn function will be resolved at run time.
But first, this is how PeopleSoft explains it:
The %CurrentDateIn meta-SQL variable expands to a platform-specific SQL
substring representing the current date in the Where clause of a SQL
Select or Update statement, or when the current date is passed in an
And here is an example:
I have been working a lot with Grids lately and this is an example on how to hide an "Add" button under the grid so that users can only enter one row.
The comments between the code should explain what I'm trying to do here. But please, don't hesitate to ask if need be!
Local Rowset &RSEthnic;
As you can see from the picture below, I have prevented the Xlat value of "BUSN" to appear in the dropdown list although it is an active value on the Email Type Field. See the PeoleCode below to accomplish such a task.
Sometimes users click the "+" on the grid to enter data but end up
clicking it more than once and getting some extra empty rows in the
gird. The peopleCode to get rid of any extra empty grid rows when the
user saves is as follows:
The picture below shows a gird with 2 rows, one of Address Type "Home" and the other with Address Type "Mailing". I would like to hide rows on the grid that have anything other than Address Type "Home":
Now what I would like to accomplish is this:
This code should be helpful if you are trying to hide a grid column using PeopleCode
hide a column in a grid (using the Grid and GridColumn objects). You no
longer must loop through every row in the grid and hide that field. Now
you can use the GridColumn property Visible. The Visible property will
also hide grid columns that are displayed as tabs in the PeopleSoft
In one of my previous posts; I showed you how to populate a grid
using a record or view and a "where" clause. But, what if you want to
narrow the data on the grid depending on what the customer wants to see.
Lets say you have a grid that shows PTO balance for your employees. The
page the customer is using have a check box that if checked will narrow
the grid data to only show "Negative" PTO balances. This is how you go
about doing that:
Sometimes you would like to bypass the search page depending on the
user's role. For some users, they need the ability to look at other
employee’s time sheets, managers for example. However, for others, they
should only be restricted to their own data. Below is PeopleCode
example that will bypass the search page depending on users' role.
Grids are used all the time in PeopleSoft, and to populate them with
dynamic data could be quite challenging. Use the "Select" function to
read data from the database tables or views into either a row or rowset
The following example first flushes the hidden work
scroll, then selects into it based on a field on the page, or any
criteria that you add to the “where clause”.
|Peoplesoft Web PIA installation||PeopleSoft Technical||03/15/2017 - 2:20am|
|Populate Multiple Grids on a same Page with diff output based on conditions.||PeopleSoft Technical||03/04/2017 - 1:35pm|
|Updating a row using Peoplecode - Component Interface.||PeopleSoft Technical||02/21/2017 - 11:26pm|
|To load CSV file data into staging table without using file layout||PeopleSoft Technical||01/15/2017 - 8:31am|