Apr 10, 2014

Phone Number Validation Using Regular Expressions in PeopleSoft

Local JavaObject &oPhoneNumExpression = CreateJavaObject("java.lang.String", "\+{0,1}[0-9\s\-\(\)]+");
Local JavaObject &oPhoneNum = CreateJavaObject("java.lang.String", &PhoneValue);
If &oPhoneNum.matches(&oPhoneNumExpression) = False Then
   MessageBox(0, "", 0, 0, "Enter valid phone number");

Regular Expression "\+{0,1}[0-9\s\-\(\)]+"   : It allows a number + in starting and - in the middle of the number.
&PhoneValue : Contains the entered phone number value.

Dec 20, 2013

Reading excel file using jxl in peoplesoft

Reading Excel using Java:
Step1: Create a java class to read excel and compile and place the class file in /app/psoft/psadmin/appserv/classes  .

/* Java class to read excel  file */
import java.io.*;
import jxl.*;
public class ReadExcelFile {
public static void main(String[] args){
public Workbook Readworkbook(String Filename){
try {
Workbook ReadExcel = Workbook.getWorkbook(new File(Filename));
return ReadExcel;
catch (Exception i)
            return null;

Step 2: Use the below code to read data

Local string &strGetEnv = GetEnv("PS_HOME");
Local string &St_path_l = &strGetEnv | "/user/" | %DbName | "/ABC.xls";
Local JavaObject &Obj_class_l = CreateJavaObject("nExcel");
Local JavaObject &Obj_getworkbook_l = &Obj_class_l.readWorkbook(&St_path_l);
&rows = &Obj_getworkbook_l.getSheet(0).getRows();
&cols = &Obj_getworkbook_l.getSheet(0).getColumns();
WinMessage("No of rows:" | &rows | " No of columns:" | &cols, 0);
Local string &St_returnvalue_l;
For &i = 1 To &rows - 1
   For &j = 0 To &cols - 1;
      &St_returnvalue_l = &Obj_getworkbook_l.getSheet(0).getCell(&j, &i).getContents();
      MessageBox(0, "", 0, 0, "" | &St_returnvalue_l);


Jul 25, 2013

Changing tablespace of a record.

If you want to assign a record to the new tablespace that you created 

open your record, and go to Tools --> Data Administration --> Set Tablespace.

then you can assign new table space to record.

Feb 13, 2013

New features in peopletools 8.53

New Features :
       1.       New styles for a contemporary appearance.
       2.       More flexibility in WorkCenters and Dashboards.
       3.       Improvements to the Related Content Framework, Related Actions, and Activity Guides.
PeopleSoft Secure by Default Initiative
       1.       Safeguards for ensuring that passwords for default user accounts are set during installation.
       2.        Additional mitigation for brute force and denial-of-service attempts.
       3.        Additional security for file attachments and the Report Repository.
PeopleSoft Search Framework
      1.       Multiple FTP credential support: The PeopleSoft Search Framework now supports the use of multiple FTP servers for storing attachments. As long as the FTP server is defined as a URL definition in PeopleTools and is listed as an FTP URL within the Search Framework, search results will recognize the FTP location.
PeopleSoft Update Manager
      1.       PeopleSoft Update Manager (PUM) is a new capability that simplifies the process of applying
Maintenance to meet customers’ needs.
      2.       Customers now have the option of reviewing fixes provided in application maintenance and deciding which fixes and enhancements will be of value to them.
      3.       Reduce the number of unnecessary fixes customers must apply to their system to resolve a
particular issue.
      4.       Decrease the risk of applying individual fixes rather than complete maintenance packs or bundles.
Data Migration Workbench
      1.       The Data Migration Workbench is a new tool that helps users manage the process of moving configuration data from one system to another.
      2.       It assists with the following process steps:
a.       Define structured configuration data in one system .
b.      Define conditions for extraction of the data in preparation of migration.
c.       Extract the data from the source system.
d.      Migrate/import the data to one or more target systems according to defined import rules.

JavaScript Object Notation (JSON) from Documents
      1.       Documents can now read and write from JavaScript Object Notation (JSON).
      2.       In 8.53 standard PeopleCode can be generated automatically and used by developers as a template to read and write data from a document.
Reporting and Analysis Tools
     1.       New My Reports Pagelet
a.       Opening of the actual report directly instead of a page to display a list of files.
b.      Grouping of multiple instances of the same report.
     2.       Chart Enhancements
a.       Making use HTML, CSS3, and JavaScript instead of the server-based chart engine.
     3.       Pivot Grid Enhancements
a.       Multi Select Filters that provide the ability to filter data on multiple values instead of a single value.
b.      Progressive Filtering that shows only valid values for the current filter selection when a filter value is modified.
c.        Dynamic passing of prompt values into the Pivot Grid being displayed in a Related Content frame or in Related Actions.

Jan 31, 2013

AE Peoplecode to read data from excel

Local array of string &a;
&sFilePath = "C:\temp\template.xls";
&oWorkApp = CreateObject("COM", "Excel.Application");
ObjectSetProperty(&oWorkApp, "Visible", True);
&oWorkBook = ObjectGetProperty(&oWorkApp, "Workbooks");
&oWorkSheet = &oWorkApp.Worksheets("Sheet1");
&rowcount = &oWorkSheet.Usedrange.rows.count;
&cellcount = &oWorkSheet.Usedrange.cells.count;
&columncount = &oWorkSheet.Usedrange.columns.count;
MessageBox(0, "", 0, 0, "RowCount:" | &rowcount);
MessageBox(0, "", 0, 0, "CellCount:" | &cellcount);
MessageBox(0, "", 0, 0, "ColumnsCount:" | &columncount);
For &i = 1 To &rowcount
   rem  &a = CreateArray("");
   For &j = 1 To &columncount
      &data = &oWorkSheet.Cells(&i, &j).Value;
      rem &a.Push(&data);
      MessageBox(0, "", 0, 0, "data in" | &i | " row " | &j | " column :" | &data);
&oWorkApp.DisplayAlerts = "True";