Wednesday, October 30, 2013

HyperLink of a file in PeopleSoft page

Usually files are stored on the Application Server or in the database as attachments, since it is the application server that does the processing and not the webserver. It is common to place the file on the appserver or in the database.This is better manageable and movable between environments.

After placing the file on the appserver or in the database you can create a link on a page and use the ViewAttachment function to link to the file. ViewAttachment() retrieve the file from the server and show it to the user and it may require ftp to be configured for its paramater URL.

If you really want to place it on the webserver, you can add the file to the root of PIA, something like
[PS_CFG_HOME]\webserv\peoplesoft\applications\peoplesoft\PORTAL.war\myfile.htm
or
[PS_HOME]\webserv\peoplesoft\applications\peoplesoft\PORTAL.war\myfile.htm

Now you can access the file directly via the webserver by defining a url like
http:/<server>:<port>/myfile.htm

Monday, October 28, 2013

Rowset Flush() and Select()

&SELECT_STRING = "WHERE 1 = 1";

if [some condition] then
&SELECT_STRING = &SELECT_STRING | " AND YOUR_FIELD = '" | &Variable | "'";
end-if;
[more conditions/fields as required]

&RS1 = GetLevel0()(1).GetRowset(Scroll.YOUR_RECORD_VW);
&RS1.Flush();
&RS1.Select(Record.YOUR_RECORD_VW, &SELECT_STRING);

Wednesday, October 9, 2013

Messagebox Yes No button

REM - confirmation from user;
&n_Check = WinMessage(MsgGetText(0, 0, "Content can not be changed once saved. Do you want to Continue?"), 4);

If &n_Check <> 6 Then
   /* Cancel save */
   MessageBox(0, " ", 20000, 6, "Your content has not been saved");
End-If;


-------------------

&re = WinMessage(&job_SWHA, 1);

0 gives you 'OK'
1 gives you 'OK' and 'Cancel'
2 gives you 'Abort', 'Retry', and 'Ignore'
3 gives you 'Yes', 'No' and 'Cancel'
4 gives you 'Yes' and 'No'
5 gives you 'Retry' and 'Cancel'

The value of &re gives you which button user has selected.