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

    转: 我们知道,编程中数据的传输,保存,为了考虑安全性的问题,需要将数据进行加密.我们拿数据库做例子.如果一个用户注册系统的数据库,没有对用户的信息进 行保存,如,我去页面注册,输入"Vic ...

  2. NOIP201401珠心算测验

    珠心算测验  问题描述]  珠心算是一种通过在脑中模拟算盘变化来完成快速运算的一种计算技术.珠心算训练,既能够开发智力,又能够为日常生活带来很多便利,因而在很多学校得到普及.  某学校的珠心算老师采用 ...

  3. eclipse字体颜色设置

    修改编码:window-->perference--->General--> Configure.--> Configure.-->workspace修改编辑背景色:wi ...

  4. Asp.Net Mvc视图引擎Razor介绍

    1.Razor介绍 1)ASP.NET MVC3 带来了一种新的名为Razor 的视图引擎,提供了下列优点: Razor 的语法简单且清晰,只需要最小化的输入 Razor 容易学习,语法类似于 C#  ...

  5. Shipyard远程API

    1.鉴权模块 1.1 Login,获取token POST  http://192.168.31.149:8080/auth/login Headers Content-Type: applicati ...

  6. BZOJ 1588:营业额统计(Splay)

    http://www.lydsy.com/JudgeOnline/problem.php?id=1588 题意:中文题意. 思路:每一个点每一个点插入Splay,然后插入新的一个点之后,查这个节点的前 ...

  7. HDU 3652:B-number(数位DP)

    http://acm.hdu.edu.cn/showproblem.php?pid=3652 题意:求数位含有13和可以被13整除的数字个数. 思路:记录3种状态: st == 0 表示 从最高位到第 ...

  8. SURF

    推荐:http://www.cnblogs.com/tornadomeet/archive/2012/08/17/2644903.html SURF-Speeded Up Robust Feature ...

  9. RadioGroup+Fragment 使用Fragment的add()方法,防止使用replace每次都重新加载页面,造成资源浪费

    radiogroup+fragment是很常用的主页导航控件,之前为了代码简便一直使用的replace()替换fragment,代码如下: getSupportFragmentManager().be ...

  10. ACM题目————图的广度优先搜索

    题目描述 图的广度优先搜索类似于树的按层次遍历,即从某个结点开始,先访问该结点,然后访问该结点的所有邻接点,再依次访问各邻接 点的邻接点.如此进行下去,直到所有的结点都访问为止.在该题中,假定所有的结 ...