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-4 Set Lov Properties
4.   Set the lov properties as show 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的更多相关文章

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

  2. Using GET_APPLICATION_PROPERTY in Oracle D2k Forms

    Using GET_APPLICATION_PROPERTY in Oracle D2k Forms DescriptionReturns information about the current ...

  3. DISPLAY_ITEM built-in in Oracle D2k Forms

    DISPLAY_ITEM built-in in Oracle D2k Forms DescriptionMaintained for backward compatibility only. For ...

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

  5. CHECKBOX_CHECKED built-in in Oracle D2k Forms

    CHECKBOX_CHECKED built-in in Oracle D2k Forms DescriptionA call to the CHECKBOX_CHECKED function ret ...

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

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

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

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

随机推荐

  1. 链接库lib和dl的概念,加载方式的区别

    使用LR进行基于windows socket协议做接口测试,只提供了lr_load_dll方法来动态加载动态链接库.之前学习阶段,对TinyXML的学习,使用的静态链接库,当时在程序调用的时候方法也跟 ...

  2. 【ibus】设置ibus输入法(pinyin & sunpinyin)

    设置ibus-pinyin 在终端中运行 /usr/lib/ibus-pinyin/ibus-setup-pinyin 命令可以调出ibus的完整设置对话框 设置ibus-sunpinyin 可以执行 ...

  3. 由 "select *" 引发的“惨案”

    今天凌晨做发布, 要合并多个分数据库的表数据到主数据库中, 有 30+ 分数据库. 前面都比较顺利, 在临近结束时,突然发现一个字段的值插入错误. 有一个表 T,字段分别为 (f1, f2, f3, ...

  4. VMware中安装CentOS7网络配置静态IP地址,常用配置和工具安装

    VMware中安装CentOS7网络配置静态IP地址,常用配置和工具安装在阿里云开源镜像地址下载镜像Index of /centos/7.2.1511/isos/x86_64/http://mirro ...

  5. zabbix源码安装

    Zabbix通过C/S模式采集数据,通过B/S模式在web端展示和配置. 被监控端:主机通过安装agent方式采集数据,网络设备通过SNMP方式采集数据 Server端:通过收集SNMP和agent发 ...

  6. Linux workqueue工作原理 【转】

    转自:http://blog.chinaunix.net/uid-21977330-id-3754719.html 转自:http://bgutech.blog.163.com/blog/static ...

  7. Linux驱动开发 -- 打开dev_dbg() 【转】

    转自:http://blog.chinaunix.net/uid-20672559-id-3383042.html linux设备驱动调试,我们在内核中看到内核使用dev_dbg来控制输出信息,这个函 ...

  8. 为什么anylase和scenaio中的平均响应时间差别会这么大?

    场景里的响应时间截图如下所示: 结果里的响应时间截图如下所示:

  9. 收缩 虚拟硬盘 shrink vhd

    在使用WIN2012 的Hyper-v的虚拟磁盘时, 有时需要将磁盘中未使用的控件收缩掉, 这时就需要使用Hyper-v磁盘工具的收缩功能. 如果使用Hyper-v磁盘工具, 不能对vhd虚拟磁盘进行 ...

  10. 在子线程中使用runloop,正确操作NSTimer计时的注意点 三种可选方法

    一直想写一篇关于runloop学习有所得的文章,总是没有很好的例子.游戏中有一个计时功能在主线程中调用: 1 + (NSTimer *)scheduledTimerWithTimeInterval:( ...