Creating Dynamic LOV in Oracle D2k Forms
Dynamic Lov is a good idea for the form where too many Lov requirement is there with different record groups. In this blog you will learn create dynamic Lov step by step.
See also:
http://www.foxinfotech.in/2015/01/populate-list-with-recordgroup-in-oracle-forms.html
http://www.foxinfotech.in/2013/04/adding-value-combolist-runtime-oforms.html
http://www.foxinfotech.in/2013/03/when-validate-item-trigger-oracle-forms.html
http://www.foxinfotech.in/2012/11/creating-list-item-in-oracle-d2k_9366.html
Step-1 Create a Single Lov (you can give any name)
1. Click on form builder navigator Lovs node and then click on Add button. Select create lov manually option from the window.
Step-2 Create Record Group (you can give any name)
2. Click on form builder navigator Record Groups and then click on Add button and set the properties and query as displayed in below image.
Step-3 Create Parameters
3. Click on Parameter node and then click on Add button and create 4 Char type Parameters as displayed below:
Step-5 Set Lov Column Mapping Properties
5. Set the Lov's Column Mapping Properties with the parameters as show below:
Step-6 Create a procedure to populate lov
PROCEDURE call_dynlov (IGroupName in Varchar2)
IS
blov boolean;
begin
:parameter.lovcol1 := null;
:parameter.lovcol2 := null;
:parameter.lovcol3 := Null;
:parameter.lovcol4 := Null;
set_lov_property('dynlov', group_name, IgroupName);
set_lov_property('dynlov', position, (get_application_property(display_width)-600)/2,
(get_application_property(display_height)-250)/2-50);
blov := show_lov('dynlov');
if not blov then
message('Value not choosen.');
end if;
end;
Finally Call to this Lov with the following code:
DECLARE
rg_name VARCHAR2(40) := 'YrGroup';
rg_id RecordGroup;
errcode NUMBER;
BEGIN
rg_id := Find_Group( rg_name );
--- Create group with 4 column because we already set the lov property for 4 cols, these 3 and 4 cols will --- be not mapped to any fields
if not id_null(rg_id) then
delete_group(rg_id);
end if;
rg_id :=
Create_Group_From_Query( rg_name, 'select main_menu_name col1, sub_menu_name col2, ''3'' col3, ''4'' col4 from
fox_main_menu a, fox_sub_menu b
where a.main_menu_code = b.main_menu_code order by 1,2');
--- call the procedure
call_dynlov(rg_name);
if :parameter.lovcol1 is not null then
--- if lov selected and parameter 1 value is not null then map to field
:fox_user_prog.mmn := :parameter.lovcol1;
:Fox_user_prog.smn := :parameter.lovcol2;
end if;
END;
See also: Oracle Forms Recipes
Like us to get notifications for free source code in future, thanks.
Dynamic LOV in Oracle Forms
Reviewed by Joseph on
Feb 10
Rating:
5
Creating Dynamic LOV in Oracle D2k Forms的更多相关文章
- Creating Timer in Oracle D2k / Forms 6i and Displaying a Clock
Creating Timer in Oracle D2k / Forms 6i and Displaying a Clock This is about timer in D2k An externa ...
- Using GET_APPLICATION_PROPERTY in Oracle D2k Forms
Using GET_APPLICATION_PROPERTY in Oracle D2k Forms DescriptionReturns information about the current ...
- DISPLAY_ITEM built-in in Oracle D2k Forms
DISPLAY_ITEM built-in in Oracle D2k Forms DescriptionMaintained for backward compatibility only. For ...
- Refresh / Updating a form screen in Oracle D2k Forms 6i
Refresh / Updating a form screen in Oracle D2k Forms 6i ProblemYou want to show number of records pr ...
- CHECKBOX_CHECKED built-in in Oracle D2k Forms
CHECKBOX_CHECKED built-in in Oracle D2k Forms DescriptionA call to the CHECKBOX_CHECKED function ret ...
- Creating List Item in Oracle D2k
Special Tips for List Items in Oracle D2k In this section, I shall discuss some special tips and tec ...
- How To Tune or Test PLSQL Code Performance in Oracle D2k Forms
You can test or tune your program unit performance in Oracle forms with Ora_Prof package.Suppose you ...
- Reading Csv Files with Text_io in Oracle D2k Forms
Below is the example to read and import comma delimited csv file in oracle forms with D2k_Delimited_ ...
- Creating Object Library OLB in Oracle D2k Form
With following steps you can create Object Library (OLB) in Oracle D2k Forms.Step - 1Create a form i ...
随机推荐
- zw版【转发·台湾nvp系列Delphi例程】HALCON FillUpShape1
zw版[转发·台湾nvp系列Delphi例程]HALCON FillUpShape1 procedure TForm1.Button1Click(Sender: TObject);var img : ...
- jquery冲突细节
使用jquery报一个错误,之前也遇到过,今天记录下来,方便以后使用 Uncaught TypeError: Object #<Object> has no method 'test' 这 ...
- mysql笔记05 优化服务器设置
优化服务器设置 1. MySQL有大量可以修改的参数--但不应该随便去修改.通常只需要把基本的项配置正确(大部分情况下只有很少一些参数时真正重要的),应将更多时间花在schema的优化.索引,以及查询 ...
- 【python cookbook】【数据结构与算法】2 从任意长度的可迭代对象中分解元素
从某个可迭代对象中分解出N个元素,但是可迭代对象的长度可能超过N,会出现“分解值过多”的异常: 使用“*表达式”来解决该问题: Python 3.4.3 (v3.4.3:9b73f1c3e601, F ...
- 160927、用jquery 重置表单的方法
清空 我们项目小小部分的搜索条件: 客户要做的是,只要一键 "清空搜索条件" 即可清空维护地点.订单ID等条件. js函数 //重置表单 function resetform(){ ...
- Hibernate,JPA注解@ManyToMany
@ManyToMany默认处理机制,当双向多对多关联中没有定义任何物理映射时, Hibernate根据以下规则生成相应的值: 关联表名: 主表表名+_下划线+从表表名: 关联到主表的外键名:从表用于关 ...
- 在MyEclipse中搭建Spring MVC开发环境
环境版本 IDE:MyEclipse 8.5 Spring:spring 3.2.8 JDK:1.6 1.打开MyEclipse-->File-->New-->Web Project ...
- java 练习题
题目:想控制台输1-3个整数,按顺序为年,月,日.#号键结束输入.若输入一个整数,则为年份,程序判断是闰年还是平年:若输入两个整数,则为年份和月份,程序将输出该年的月份的天数:若输入3个整数:则为年, ...
- 【转】Tomcat中部署java web应用程序
http://www.blogjava.net/jiafang83/archive/2009/06/02/279644.html 转载:今天给大家介绍怎样在Tomcat5.5.9中部署Java Web ...
- c#中的委托和事件(转)
引言 委托 和 事件在 .Net Framework中的应用非常广泛,然而,较好地理解委托和事件对很多接触C#时间不长的人来说并不容易.它们就像是一道槛儿,过了这个槛的人,觉得真是太容易了,而没有过去 ...