Saturday, June 4, 2011

Most Frequently Used System Variables


Post Level         : Advanced/Must to Know
Target Readers : Beginners to Experts


PeopleTools provides a number of system variables that provide access to system information. System variables are prefixed with the ‘%’ character, rather than the ‘&’ character. You can use these system variables wherever you can use a constant, passing them as parameters to functions or assigning their values to fields or to temporary variables.

There are 79 system variables in PeopleTools(8.49). In this section, we will discuss 31 the most frequently used system variables.

%AsOfDate
Description
Returns the as-of-date of the environment that the PeopleCode is running in. In most cases, this is the current date, but for Application Engine environments, it is the processing date of the Application Engine program.

%ClientDate
Description
%ClientDate returns the current date for the current user, adjusted for the user’s time zone. This is the date as specified with the current user's personalizations.
You can use this system variable as the default constant for a date field.
This is potentially one day different than the server date, which is returned with %Date.