12
返回列表 发新帖
楼主: hbwp2008

FORM問題

[复制链接]
论坛徽章:
23
ITPUB元老
日期:2005-02-28 12:57:00生肖徽章2007版:虎
日期:2008-01-02 17:35:532010年世界杯参赛球队:韩国
日期:2010-04-08 17:56:442010广州亚运会纪念徽章:帆船
日期:2011-04-01 14:54:19
11#
发表于 2007-8-9 15:10 | 只看该作者
请参考二次开发手册中的:
Passing Instructions to a Form
To pass information when navigating from one form to another when
both forms are already open, use the WHEN–FORM–NAVIGATE
trigger. You do not code this trigger directly; instead pass the
information through global variables.
To use this trigger, populate a global variable called
GLOBAL.WHEN_FORM_NAVIGATE with the name of a user–named
trigger. When a form is navigated to, this trigger fires.
The WHEN–FORM–NAVIGATE trigger fires upon programmatically
navigating to a form using the GO_FORM built–in. Accordingly, this
trigger is referenced into all forms.
Querying an Item
It often makes sense to navigate to a form and query on a specific item.
For example, suppose you have an Order Entry form ORDERS and a
Catalog form CATALOGS. You want to navigate from the ORDERS
form to CATALOGS and query up a specific part number.
• In the ORDERS form, create a global variable called
GLOBAL.PART_NUMBER, and populate it with the value you
want to query.
• In the ORDERS form, create a global variable called
GLOBAL.WHEN_FORM_NAVIGATE. Populate this variable
with the string ”QUERY_PART_NUMBER”.
• Create a user–named trigger in the CATALOGS form,
”QUERY_PART_NUMBER”. In this trigger, enter query mode
by calling EXECUTE_QUERY.
• Create a PRE–QUERY trigger in the CATALOGS form that calls
copy(’GLOBAL.PART_NUMBER, ’PARTS_BLOCK.PART_
NUMBER’). Then call copy(’’,’GLOBAL.PART_NUMBER’).
When there is a value in GLOBAL.PART_NUMBER, it becomes
part of the query criteria.

使用道具 举报

回复
论坛徽章:
1
ITPUB新首页上线纪念徽章
日期:2007-10-20 08:38:44
12#
发表于 2007-8-12 20:40 | 只看该作者
我也遇到过两个FORM互相调用的例子
首先在两个FORM中定义同一个参数
在主FORM中可以通过一个BUTTON调用FND_FUNCTION.EXECUTE
,然后在次的FORM中FORM  TRIGGER下的WHEN-NEW-FORM-INSTANCE下执行EXECUTE_QUERY
最后在DATA BLOCK  TRIGGER下的PRE_QUERY下将主FORM的参数传给次FORM的参数,通过这个参数查询出值

我已经测试过是OK的啦,你可以试下啊?嘻嘻......

使用道具 举报

回复

您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

TOP技术积分榜 社区积分榜 徽章 团队 统计 知识索引树 积分竞拍 文本模式 帮助
  ITPUB首页 | ITPUB论坛 | 数据库技术 | 企业信息化 | 开发技术 | 微软技术 | 软件工程与项目管理 | IBM技术园地 | 行业纵向讨论 | IT招聘 | IT文档
  ChinaUnix | ChinaUnix博客 | ChinaUnix论坛
CopyRight 1999-2011 itpub.net All Right Reserved. 北京盛拓优讯信息技术有限公司版权所有 联系我们 未成年人举报专区 
京ICP备16024965号-8  北京市公安局海淀分局网监中心备案编号:11010802021510 广播电视节目制作经营许可证:编号(京)字第1149号
  
快速回复 返回顶部 返回列表