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的更多相关文章

  1. 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 ...

  2. ASP.NET MVC 学习笔记-5.Controller与View的数据传递

    ViewData属性 ViewData属性是System.Web.Mvc.ControllerBase中的一个属性,它相当于一个数据字典.Controller中向该字典写入数据,ViewData[“K ...

  3. 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 ...

  4. asp.net mvc 之旅 —— 第五站 从源码中分析asp.net mvc 中的TempData

    在mvc的controller中,我们知道有很多的临时变量存放数据,比如说viewData,viewBag,还有一个比较特殊的tempData,关于前两个或许大家都明白, 基本上是一个东西,就是各自的 ...

  5. .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 ...

  6. Linux 日志报错 xxx blocked for more than 120 seconds

    监控作业发现一台服务器(Red Hat Enterprise Linux Server release 5.7)从凌晨1:32开始,有一小段时间无法响应,数据库也连接不上,后面又正常了.早上检查了监听 ...

  7. Fundamentals of MVC

     Chapter 1 Fundamentals of MVC    Microsoft's Web Development Platforms Understanding the past can b ...

  8. 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 ...

  9. python学习笔记整理——dictView [未整理]

    Dictionary view objects简介 The objects returned by dict.viewkeys(), dict.viewvalues() and dict.viewit ...

随机推荐

  1. 《一课经济学》书摘笔记I

    人在经济活动中追求私利的天性,以及天生短视的倾向(即总是只关注某项政策的即时影响,或者只关注政策对某个特殊群体产生的影响,而不去探究那项政策对所有群体造成的长远影响)以上种种致使经济规律的研究复杂艰难 ...

  2. [Flex] ButtonBar系列——flex3 ButtonBar属性labelPlacement标签相对于指定图标的方向

    <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="h ...

  3. JAVA错误:Cannot refer to a non-final variable * inside an inner class defined in a different method

    在使用Java局部内部类或者内部类时,若该类调用了所在方法的局部变量,则该局部变量必须使用final关键字来修饰,否则将会出现编译错误“Cannot refer to a non-final vari ...

  4. java socket通讯(一) 入门示例

    一.入门 要想学习socket通讯,首先得知道tcp/ip和udp连接,具体可参考浅谈TCP/IP 和 UDP的区别 二.示例 首先新建了一个java工程,包括两个部分,客户端SocketClient ...

  5. Mac 下 Maven 的命令行安装

    JDK 的安装 系统的“系统偏好设置”中我们可以看到 Java的设置, Java 7(含) 之后的版本在这里可以看到. 点击进去后,可以看到独立的 Java 控制面板 注意,这里是 JRE 的版本, ...

  6. 菜鸟-手把手教你把Acegi应用到实际项目中(5)

    在实际企业应用中,用户密码一般都会进行加密处理,这样才能使企业应用更加安全.既然密码的加密如此之重要,那么Acegi(Spring Security)作为成熟的安全框架,当然也我们提供了相应的处理方式 ...

  7. 访问控制符private,default,protect和public

    程序,通过封装以实现"高内聚,内耦合". 个人理解,类内,包内,子类和所有类,是java的四个范围. private表示作用区域为类内,即只是自己(像牙刷). default表示作 ...

  8. 03-position和anchorPoint

    *:first-child { margin-top: 0 !important; } body > *:last-child { margin-bottom: 0 !important; } ...

  9. bochs安装一系列问题

    http://blog.chinaunix.net/uid-23817499-id-3418083.html http://www.mouseos.com/os/tools/bochs.html    ...

  10. telnet登录路由器启动服务的shell脚本

    因为在测试中经常要telnet登录到路由器中去配置环境启动路由器,每次都输入一遍命令太麻烦了,想着写一个shell脚本实现自动登录.配置环境.启动服务的过程. 脚本实现是使用expect来实现的,所以 ...