Create a new project IMAGES_PS.
Step 1:
Create a derived/work record WEBLIB_IMAGES and add field ISCRIPT1. Add this record to the project.
Step 2:
Under WEBLIB_IMAGES.ISCRIPT1.FieldFormula write code and insert it into project IMAGES_PS.
Function IScript_Images()
Local SQL &SQLGetImages;
Local string &ImageHTML, &ImageName;
Local string &sHTML;
&SQLGetImages = CreateSQL("SELECT CONTNAME FROM PSCONTDEFN C WHERE C.ALTCONTNUM = (SELECT MAX(C1.ALTCONTNUM) FROM PSCONTDEFN C1 WHERE C1.CONTNAME = C.CONTNAME AND C1.CONTFMT <> '') AND C.CONTFMT = ( SELECT MAX(C1.CONTFMT) FROM PSCONTDEFN C1 WHERE C1.CONTNAME = C.CONTNAME AND C1.ALTCONTNUM = C.ALTCONTNUM AND C1.CONTFMT <> '')");
While &SQLGetImages.Fetch(&ImageName)
&sHTML = GetHTMLText(HTML.N_HTML_IMAGE, &ImageName);
%Response.Write(&sHTML);
End-While;
&SQLGetImages.Close();
End-Function;
Step 1:
Create a derived/work record WEBLIB_IMAGES and add field ISCRIPT1. Add this record to the project.
Step 2:
Under WEBLIB_IMAGES.ISCRIPT1.FieldFormula write code and insert it into project IMAGES_PS.
Function IScript_Images()
Local SQL &SQLGetImages;
Local string &ImageHTML, &ImageName;
Local string &sHTML;
&SQLGetImages = CreateSQL("SELECT CONTNAME FROM PSCONTDEFN C WHERE C.ALTCONTNUM = (SELECT MAX(C1.ALTCONTNUM) FROM PSCONTDEFN C1 WHERE C1.CONTNAME = C.CONTNAME AND C1.CONTFMT <> '') AND C.CONTFMT = ( SELECT MAX(C1.CONTFMT) FROM PSCONTDEFN C1 WHERE C1.CONTNAME = C.CONTNAME AND C1.ALTCONTNUM = C.ALTCONTNUM AND C1.CONTFMT <> '')");
While &SQLGetImages.Fetch(&ImageName)
&sHTML = GetHTMLText(HTML.N_HTML_IMAGE, &ImageName);
%Response.Write(&sHTML);
End-While;
&SQLGetImages.Close();
End-Function;
Step 3: Add HTML to the project and save it as HTML_IMAGE
And add code:
<img src=%IMAGE(%BIND(:1)) height="50" width="50" alt="Image"/>
Step 4: Give permission to web library WEBLIB_IMAGES.ISCRIPT1.FieldFormula to the permission list.
Step 5: Go to your link:
https://pdev.demo.com/psp/DEVDB/EMPLOYEE/HRMS/s/WEBLIB_IMAGES.ISCRIPT1.FieldFormula.IScript_Images
You will need to change the part highlighted in red to your peoplesoft URL.