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 ...
随机推荐
- spring整合struts
整合目标:使用spring的bean管理struts action service. 整合步骤: 一.加入spring 1.加入spring jar包 2.配置web.xml文件 <contex ...
- java异常处理机制throws
throws可以在方法声明时抛出的异常.原则上throws声明的异常,一定要在该方法中抛出,否则没有意义. 相反的,若方法中我们主动通过throw抛出一个异常,应该在throws中声明该种类异常,通知 ...
- eclipse导入不到嵌套的项目
search for nested projects搜索不到嵌套项目
- convert NameValueCollection/Dictionary<string, object> to JSON string
public static class WebExtension { public static T Decode<T>(this RequestBase res) { Type type ...
- MacPE+WinPE-黑苹果之路
装黑苹果过程中,安装.备份.恢复都需要启动到MAC,总是从硬盘启动对于硬盘数据风险太大,琢磨着安装个pe用来维护,此外手上的winpe,也想着一并实现,免得搞两个u盘.找了个网页开工,http://b ...
- linux包转发开发
28号晚上接到这个任务的, 看了点epoll, 29号上午安装Ubuntu 12.10的G++, 开始把内网的vm虚拟机文件, 复制到外网, 重新建立一个虚拟机再更新, 最后外网也没能安装得了g++. ...
- Haar特征
转自:http://blog.csdn.net/carson2005/article/details/8094699 Haar-like特征,即很多人常说的Haar特征,是计算机视觉领域一种常用的特征 ...
- [WinForm]平均切割图片AvgCutImage
昨天晚上下班前有朋友问我有的人的QQ空间相册的那种多个图片拼接成一张完整的图片的是怎么做到的比如像这样效果: 嘛,反正我是1000%不会使用这样封面来做网络相册的封面,因为用户体验实在是太差了.完全不 ...
- C++调用WebService服务问题总结
近期接手一部分C++研发工作,同时与.NET开发小组进行软件功能协作,于是需要调用.NET WebService服务,已完成数据的网络通讯业务功能:结束之余,将手头碰到的问题总结罗列如下: C++如何 ...
- GLib基础
实用功能 GLib中包含了近二十种实用功能,从简单的字符处理到初学者很难理解的XML解析功能,这里介绍两种较简单的:随机数和计时. 下面代码演示如何产生1-100之间的随机整数和演示如何计算30000 ...