SlideShare a Scribd company logo
2
Most read
Views are a useful feature of SQL databases, letting us create virtual tables based on SQL select
statements.

PeopleSoft 8 provides the functionality to create dynamic views. These are essentially SQL
statements executed on the fly by the PeopleSoft component processor. We can use dynamic
views in Peoplesoft pages only because they are Peopletools objects, not SQL Objects.

Using Dynamic view as Prompt Table

In this article, we will see the use of Dynamic view as prompt table. Please note that dynamic
view can be used for other purposes such as search records which will not discussed in the
article.

One major question that pops up to many of us the first time we use dynamic view, why not use
a normal view instead of dynamic view. A dynamic view’s select statement may include
Peoplesoft’s meta-SQL, and it may be replaced by a different SQL statement while the user is
using the page. And also there might be situations where which you do not save the view in the
database.

Using Edit Table for prompt tables

Assume that you have page in which user selects a country and depending on the selection you
want a different prompt table for the states. For example if user selects US show states for US
and user selects Canada show states of canada.

This can achieved by following the steps below

Step 1 : Create two views/dynamic views for show the states of US and canada.
Step 2 : Go to record field ,in our case it is state field (Right click and select View Definition on
the state field on the page).
Step 3 : Right Click and select Record Field Properties
Step 4 : Select Edits tab and then select Table Edit. Select Prompt table with edit( or No Edit)
as per your requirement. Write %EDITTABLE aganist Prompt table.*EDITTABLE is a field
in table named DERIVED, provided by peoplesoft.

Step 5 : Place the EDITTABLE field from DERIVED Table on the page.
Step 6 : On field change of Country Field, write the below code

if YOURRECORDNAME.COUNTRY = "US";
  DERIVED.EDITTABLE = "STATE_US_DVW"; // dynamic view of list of states of US
Else
  DERIVED.EDITTABLE = "STATE_CAN_DVW"; // dynamic view of list of states of
CAN
End-if;
Note : Using views or dynamic views in this situation doesnot change anything. It is up to the
user to decide whether he wants two sql objects to be created or not.

Using SQL Text

Instead of creating two views/dynamic views, you can also create one dynamic view and pass the
SQL dynamically to

change the prompt table.

Step 1 : Create and save A Dynamic view
Step 2 : Give the dynamic view as a prompt table to the state field.
Step 3 : On field change of the your country field you can write

if YOURRECORDNAME.COUNTRY = "US";
    YOURRECORDNAME.FIELD.SqlText = "Select State from MY_STATE_TBL where
country = 'US'";
ELSE
    YOURRECORDNAME.FIELD.SqlText = "Select State from MY_STATE_TBL where
country = 'CAN'";
END-IF;

More Related Content

DOCX
Vb.net class notes
PDF
JOB PORTAL SYSTEM
PDF
Operating system and C++ paper for CCEE
PPTX
Tk2323 lecture 11 process and thread
PPT
Ch 3 event driven programming
PPTX
Design documentation
PPT
software development and programming languages
PPTX
Presentation of wireless todo list app
Vb.net class notes
JOB PORTAL SYSTEM
Operating system and C++ paper for CCEE
Tk2323 lecture 11 process and thread
Ch 3 event driven programming
Design documentation
software development and programming languages
Presentation of wireless todo list app

What's hot (20)

PPT
Introduction to Android Fragments
PPTX
A Presentation on Development of a Simple Calculator
PPT
01 c++ Intro.ppt
PDF
Function in Python
PDF
Android Development in a Nutshell
PDF
Android activities & views
PPT
Photoshop
DOC
Sample One
PPT
People soft application-designer-practice-8.43
PPTX
Android User Interface
PPTX
Pscs6 ch08 ppt
PDF
Java Programming - 05 access control in java
PPTX
Java DataBase Connectivity API (JDBC API)
PPTX
core java
PPTX
Java Input Output (java.io.*)
PPT
android activity
PPTX
Presentation on Android application
PDF
Introduction to Android Development
PDF
OOP Assignment 03.pdf
PPTX
Autoboxing And Unboxing In Java
Introduction to Android Fragments
A Presentation on Development of a Simple Calculator
01 c++ Intro.ppt
Function in Python
Android Development in a Nutshell
Android activities & views
Photoshop
Sample One
People soft application-designer-practice-8.43
Android User Interface
Pscs6 ch08 ppt
Java Programming - 05 access control in java
Java DataBase Connectivity API (JDBC API)
core java
Java Input Output (java.io.*)
android activity
Presentation on Android application
Introduction to Android Development
OOP Assignment 03.pdf
Autoboxing And Unboxing In Java
Ad

Similar to Dynamic view (20)

PDF
770_0629.pdf dump for oracle cloud interface
PPT
Hello Android
PDF
Oracle ADF 11g Tutorial
PDF
obiee-training-obiee-11g-bi-publisher.pdf
PDF
Mds cdc implementation
PPTX
CREATING A DATASET FROM EXCEL IN POWER BI REPORT BUILDER
DOCX
Informatica cloud Powercenter designer
DOCX
Grid view control
DOCX
synopsis
PPT
Metamorphosis from Forms to Java: A technical lead's perspective, part II
PDF
COVID-19 SAP SuccessFactors Candidate Relationship Management (CRM) Configura...
PDF
Accounting Information Systems 8th Edition Hall Solutions Manual
PDF
Accounting Information Systems 8th Edition Hall Solutions Manual
DOCX
Defining key flexfields
PDF
Oracle9i reports developer
PPTX
111111111powerbibasics-190718075620.pptx
PPTX
Power Bi Basics
DOCX
OBIEE publisher with Report creation - Tutorial
PPTX
Google Associate Android Developer Certification
PPTX
Ch07_SQL- The PostgreSQL Wkkkkkkkkay.pptx
770_0629.pdf dump for oracle cloud interface
Hello Android
Oracle ADF 11g Tutorial
obiee-training-obiee-11g-bi-publisher.pdf
Mds cdc implementation
CREATING A DATASET FROM EXCEL IN POWER BI REPORT BUILDER
Informatica cloud Powercenter designer
Grid view control
synopsis
Metamorphosis from Forms to Java: A technical lead's perspective, part II
COVID-19 SAP SuccessFactors Candidate Relationship Management (CRM) Configura...
Accounting Information Systems 8th Edition Hall Solutions Manual
Accounting Information Systems 8th Edition Hall Solutions Manual
Defining key flexfields
Oracle9i reports developer
111111111powerbibasics-190718075620.pptx
Power Bi Basics
OBIEE publisher with Report creation - Tutorial
Google Associate Android Developer Certification
Ch07_SQL- The PostgreSQL Wkkkkkkkkay.pptx
Ad

Dynamic view

  • 1. Views are a useful feature of SQL databases, letting us create virtual tables based on SQL select statements. PeopleSoft 8 provides the functionality to create dynamic views. These are essentially SQL statements executed on the fly by the PeopleSoft component processor. We can use dynamic views in Peoplesoft pages only because they are Peopletools objects, not SQL Objects. Using Dynamic view as Prompt Table In this article, we will see the use of Dynamic view as prompt table. Please note that dynamic view can be used for other purposes such as search records which will not discussed in the article. One major question that pops up to many of us the first time we use dynamic view, why not use a normal view instead of dynamic view. A dynamic view’s select statement may include Peoplesoft’s meta-SQL, and it may be replaced by a different SQL statement while the user is using the page. And also there might be situations where which you do not save the view in the database. Using Edit Table for prompt tables Assume that you have page in which user selects a country and depending on the selection you want a different prompt table for the states. For example if user selects US show states for US and user selects Canada show states of canada. This can achieved by following the steps below Step 1 : Create two views/dynamic views for show the states of US and canada. Step 2 : Go to record field ,in our case it is state field (Right click and select View Definition on the state field on the page). Step 3 : Right Click and select Record Field Properties Step 4 : Select Edits tab and then select Table Edit. Select Prompt table with edit( or No Edit) as per your requirement. Write %EDITTABLE aganist Prompt table.*EDITTABLE is a field in table named DERIVED, provided by peoplesoft. Step 5 : Place the EDITTABLE field from DERIVED Table on the page. Step 6 : On field change of Country Field, write the below code if YOURRECORDNAME.COUNTRY = "US"; DERIVED.EDITTABLE = "STATE_US_DVW"; // dynamic view of list of states of US Else DERIVED.EDITTABLE = "STATE_CAN_DVW"; // dynamic view of list of states of CAN End-if;
  • 2. Note : Using views or dynamic views in this situation doesnot change anything. It is up to the user to decide whether he wants two sql objects to be created or not. Using SQL Text Instead of creating two views/dynamic views, you can also create one dynamic view and pass the SQL dynamically to change the prompt table. Step 1 : Create and save A Dynamic view Step 2 : Give the dynamic view as a prompt table to the state field. Step 3 : On field change of the your country field you can write if YOURRECORDNAME.COUNTRY = "US"; YOURRECORDNAME.FIELD.SqlText = "Select State from MY_STATE_TBL where country = 'US'"; ELSE YOURRECORDNAME.FIELD.SqlText = "Select State from MY_STATE_TBL where country = 'CAN'"; END-IF;