Tuesday, April 28, 2015

Peoplesoft Styles Demo

View Peoplecode Styles

SQL


Run this SQL against your database and copy the output.
  1. SELECT '<div class="' || STYLECLASSNAME || '">' || STYLECLASSNAME || '</div>'
  2. FROM PSSTYLECLASS WHERE STYLESHEETNAME = 'PTSTYLEDEF'

Page

Temporary add an HTML area to any page and paste your SQL output into the value constant of your HTML area. View your page and you'll see a demo of every style for that Style sheet name in the query you ran.

Extra

If you want to create a more permanent page in your development environment that dynamically loads the HTML area with any style sheet you choose from the system you can do the following:

 Record

Create a new derived record (MY_RECORD) and add the fields
  • STYLESHEETNAME  (prompt table edit : EOPP_STSHEET_VW)
  • HTMLAREA

Page

Create a new page and add your both your derived record fields to it.  

Component

Create a component add your new page to it and add the following Peoplecode to the STYLESHEETNAME FieldChange event.

  1. Local string &qry, &qoutput, &html;
  2. Local SQL &sql;
  3. Local array &AAny = CreateArrayAny();
  4.  
  5. &qry = "SELECT '<div class=' || STYLECLASSNAME || '>' || STYLECLASSNAME || '</div>'";
  6. &qry = &qry | " FROM PSSTYLECLASS WHERE STYLESHEETNAME = :1 order by STYLECLASSNAME ";
  7.  
  8. &html = "";
  9.  
  10. &sql = CreateSQL(&qry, MY_RECORD.STYLESHEETNAME);
  11. While &sql.Fetch(&AAny)
  12. &html = &html | &AAny [1];
  13. End-While;
  14.  
  15. MY_RECORD.HTMLAREA.Value = &html;

Register your component to the menu and load your new page.

No comments:

Post a Comment