We have seven different types of records in PeopleSoft.
Among them dynamic views was a mystery when I started my carrier. I know that
dynamic views will allow you to modify the view sql at run time. But still I
was confused on why it was required.
Now to all my friends who are puzzled with the dynamic view
record object like I was at the start of my carrier, I would like to share some
facts about this record type.
To start with, dynamic views are record object which resides
only in PeopleSoft. Although you have the option to specify the view SQL, you
can safely ignore the sql part. This category of record, we are not going to
build it and there will not be any physical view in the database. An advantage
of dynamic views is that you can change the view sql dynamically at the run
time, although with a limitation on the complexity of the sql’s used.
As per my understanding, dynamic views are used popularly in
PeopleSoft for two different use cases.
1. Dynamic Prompts
This is the most popular and only use case most of the PS
developers are aware of. Using dynamic views you will be able to change the sql
of the prompt record based on the conditions that needs to be executed on the
transaction. To get a detailed idea on how to use dynamic view as a dynamic
prompt, visit the previous post
on this topic.
2. As temporary record on scrolls
When designing pages most of you might have come across a
scenario where it is not possible to put a work record fields alone in a grid
or a scroll. PeopleSoft will allow only a Sql Table or View to be used as
primary table in a grid or scroll. But often there comes a scenario where
whatever data displayed on the grid or scroll are only temporary data and there
may not be even a physical data corresponding to that present on the database.
This will prompt the developer to create unnecessary views or tables in
PeopleSoft just to handle the temporary data. This scenario, although rare, can
be solved with minimal effort using dynamic views. This usage of dynamic views
is not known to most of the developers. Yes, PeopleSoft allows you to use
dynamic view as a primary table for a scroll or grid. With dynamic views, there
is no need to create database objects for the purpose of handling temporary
data.
All you need to solve the scenario is to create a dynamic
view with required fields and drag the fields on to the grid or scroll. Now
based on your requirement, you can manipulate the grid or scroll using the
component rowset object. If you would like to load the data from database for
the corresponding fields and based on the other values on the field, you can use
the rowset methods such as Fill(), Select() etc where you can specify the
select record and entire where clause using PeopleSoft.
I’m sure that if you start utilizing the full potential of
dynamic views, you could save your time and prevent creation of some unwanted
objects in database.
No comments:
Post a Comment
Note: only a member of this blog may post a comment.