Dynamic view
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; |
Dynamic view的更多相关文章
- Dynamic Prompt Table for Record Field on PeopleSoft Page
Sometimes a situation in project work arises to have a dynamic prompt table for record fields on Peo ...
- ASP.NET MVC 学习笔记-5.Controller与View的数据传递
ViewData属性 ViewData属性是System.Web.Mvc.ControllerBase中的一个属性,它相当于一个数据字典.Controller中向该字典写入数据,ViewData[“K ...
- ASP.NET MVC 学习笔记-7.自定义配置信息 ASP.NET MVC 学习笔记-6.异步控制器 ASP.NET MVC 学习笔记-5.Controller与View的数据传递 ASP.NET MVC 学习笔记-4.ASP.NET MVC中Ajax的应用 ASP.NET MVC 学习笔记-3.面向对象设计原则
ASP.NET MVC 学习笔记-7.自定义配置信息 ASP.NET程序中的web.config文件中,在appSettings这个配置节中能够保存一些配置,比如, 1 <appSettin ...
- asp.net mvc 之旅 —— 第五站 从源码中分析asp.net mvc 中的TempData
在mvc的controller中,我们知道有很多的临时变量存放数据,比如说viewData,viewBag,还有一个比较特殊的tempData,关于前两个或许大家都明白, 基本上是一个东西,就是各自的 ...
- .NET跨平台:在Linux Ubuntu上编译coreclr/corefx/dnx(20150617)
编译时间:北京2015年6月17日上午 操作系统:Ubuntu 14.04.2 LTS Mono版本:Mono JIT compiler version 4.3.0 (master/3445ac5 T ...
- Linux 日志报错 xxx blocked for more than 120 seconds
监控作业发现一台服务器(Red Hat Enterprise Linux Server release 5.7)从凌晨1:32开始,有一小段时间无法响应,数据库也连接不上,后面又正常了.早上检查了监听 ...
- Fundamentals of MVC
Chapter 1 Fundamentals of MVC Microsoft's Web Development Platforms Understanding the past can b ...
- How to return dictionary keys as a list in Python 3.3
http://btmiller.com/2015/04/13/get-list-of-keys-from-dictionary-in-python-2-and-3.html Get a List of ...
- python学习笔记整理——dictView [未整理]
Dictionary view objects简介 The objects returned by dict.viewkeys(), dict.viewvalues() and dict.viewit ...
随机推荐
- IDEA Community(社区版) 使用Maven创建Web工程 并部署tomcat
由于IDEA社区版(Community)无法直接New一个Web Appplication 所以要使用maven来创建 1.创建一个Project 2. 3. 4.这里在Properties中添加一个 ...
- codeblocks调试快捷键说明
使用codeblocks避免不了快捷键: 在调试程序的时候: 首先在view->toolbar->debugger调出来:快捷方式可以自己看 RUN to Cursor :F4 单步调试 ...
- C++学习27 用全局函数重载运算符
运算符重载函数既可以声明为类的成员函数,也可以声明为所有类之外的全局函数. 运算符重载函数作为类的成员函数 将运算符重载函数声明为类的成员函数时,二元运算符的参数只有一个,一元运算符不需要参数.之所以 ...
- [技巧]把Excel里的数据插入到数据库里的方法
.如果先在6行数据的最后一列在插入一列数据,请先把列名写好,然后再第一行的该列下输入数字, 然后选中该单元格向下拖拽一个单元格然后就能看到黑色的小框, 双击右下角黑色的小点,6行数据就 会填上默认的第 ...
- Chapter Querying Data
Chapter Querying Data XF获取数据的三种方法: 其中参数schema,参见 Chapter Schema. 下面列出一个后面将会用到的schema片段,称之为片段A: <U ...
- css 使用background背景实现border边框效果
css中,我们一般使用border给html元素设置边框,但也可以使用background背景来模拟css边框效果,本文章向大家介绍css 使用background背景实现border边框效果,需要的 ...
- IOS开发-跨域访问DWR方法
用Phonegap做手机客户端,服务器用spring+DWR,需要在手机端访问服务器的方法,需要做以下配置,可以参见http://www.iteye.com/topic/337460: 服务器DWR配 ...
- 未在本地计算机上注册“Microsoft.Jet.OLEDB.4.0”提供程序的处理方式
今天客户向我反映一个问题,当他们在用我们的系统导出excel表格时,报错:未在本地计算机上注册“Microsoft.Jet.OLEDB.4.0”提供程序 经过找资料终于得到解决方法,记录一下. 在对应 ...
- 常见行为:仿真&重力&碰撞&捕捉
一.UIDynamic是从iOS 7开始引入的一种新技术,隶属于UIKit框架.可以认为是一种物理引擎,能模拟和仿真现实生活中的物理现象,重力.弹性碰撞等,游戏开发中很常见,例如愤怒的小鸟. 二.UI ...
- python常用内置函数
Python所以内置函数如下: 下面列举一些常用的内置函数: chr()和ord() chr()将数字转换为对应的ascii码表字母 >>> r=chr(65) >>&g ...