PeopleSoft related articles.

Hide Fields on PeopleSoft Page for Some Users

Sometimes you would like to hide fields from some users and not others. The only way that I know of is by creating a new role and assigns it to users who should not be seeing the fields.

This is how to go about doing that:

%EffDtCheck PeopleCode Built-in Function

Effective dated quires are used often in PeopleSoft and a great build-in function that will save you time is the %EffDtCheck. Lets take a closer look!


%EffDtCheck(recordname [correlation_id1], correlation_id2, as_of_date)

The %EffDtCheck construct expands into an effective date subquery suitable for a Where clause.

IsAlpha and IsAlphaNumeric Built-in Functions


Use the IsAlpha function to determine if
String contains only textual characters. It excludes all punctuation,
numerics, spaces and control codes.

The function returns a
boolean value: true if the string contains only alphabetic and textual
characters, false if it contains any umbers, punctuation or spaces.

AddToTime PeopleCode Built-in Function

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?

%CurrentDateIn Meta-SQL Function

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
Insert statement.

And here is an example:

Hide Add Button if a Row Exists on the Grid

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;

Restrict Xlat Values in a Drop Down List

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.

PeopleCode to restrict Xlat Values

Delete Grid Blank Rows Entered by Users When Saving

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:

Hide a Row in a Grid or Scroll Area Using PeopleCode

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":

Grid before peoplecode hide

Now what I would like to accomplish is this:

Hide a Grid Column From a Grid in PeopleCode

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
Internet Architecture.