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:
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!
Syntax
%EffDtCheck(recordname [correlation_id1], correlation_id2, as_of_date)
The %EffDtCheck construct expands into an effective date subquery suitable for a Where clause.
IsAlpha
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.
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
value
is always adjusted such that it represents an hour less than 24 (example: 18:45)
Syntax
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
Insert statement.
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
To
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.
Title | Under | Posted on |
---|---|---|
Component interface Error: no rows exist for the specified keys | PeopleSoft Technical | 03/15/2019 - 3:54am |
ADD 24 months starting from current month.(peoplesoft) | PeopleSoft Functional | 07/29/2018 - 8:44pm |
TRC values dropdown | PeopleSoft Technical | 04/04/2018 - 12:54am |
how to find missing sequence in GRID and print the mising sequence number while saving through peoplecode | PeopleSoft Technical | 09/11/2017 - 4:49am |
Recent comments
2 years 16 weeks ago
2 years 21 weeks ago
2 years 21 weeks ago
2 years 23 weeks ago
2 years 23 weeks ago
2 years 24 weeks ago
2 years 26 weeks ago
2 years 27 weeks ago
2 years 30 weeks ago
2 years 36 weeks ago