1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

dynamic lov when button pressed trigger raised in oracle forms 10g

Discussion in 'Oracle Forms and Reports' started by dinesh songra, Feb 15, 2015.

  1. dinesh songra

    dinesh songra Active Member

    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    55
    Hi Experts,

    I am working on Oracle forms 10g (Windows 7 OS).I have got one requirement to show one LOV for dept table. Say i have three deptno 10, 20, 30 in dept table. Suppose in a multirecord block if a user selects deptno from a lov for one record then for the next record lov it should show only emp no who is belongs to deptno:10. How to filter the deptno from a LOV record group query which are already selected?

    Thanks,
    Duksh
     
  2. RG Hegde

    RG Hegde Forum Advisor

    Messages:
    185
    Likes Received:
    35
    Trophy Points:
    310
    Location:
    Pune
    Hello

    I believe in the record group query for emp no you can filter with :block_name.column_name for dept_no
     
    dinesh songra likes this.
  3. dinesh songra

    dinesh songra Active Member

    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    55
    RG Hegde Thanks for your quick response can you please share the sudo code for the above requirement


    Regards
    Duksh
     
  4. sambuduk

    sambuduk Forum Advisor

    Messages:
    242
    Likes Received:
    73
    Trophy Points:
    455
    Location:
    Hyderabad , Telangana
    Hi Duksh,

    Do you want it for same record or next record.

    If it is for same record Use the below query in the Empno's Record group.

    Code (SQL):
    SELECT e.empno FROM emp e  WHERE e.deptno = NVL(:block_name.deptno,e.deptno)
    Regrds
    Sambasiva Reddy.K
     
    dinesh songra likes this.
  5. dinesh songra

    dinesh songra Active Member

    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    55
    The requirement is something like this when we select the deptno from the lov its should populate into the deptno field,but right now while am selecting any value from the lov its not populating into the deptno field, another requirement is like i want to show the respective empno into the emono field who is working into the selected deptno field. for ex:- if deptno:10 and empno:-101,102,107 who is working into deptno 10 that is should pouplate into the empno field.
     
  6. RG Hegde

    RG Hegde Forum Advisor

    Messages:
    185
    Likes Received:
    35
    Trophy Points:
    310
    Location:
    Pune
    Hello
    Have you mentioned return value field to the dept no in LOV wizard ?
     
    dinesh songra likes this.
  7. dinesh songra

    dinesh songra Active Member

    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    55
    RG Hegde Thanks Alot the first issue has been resolved but now another requirement is like i want to show the respective empno into the empno field who is working into the selected deptno field. for ex:- if deptno:10 and empno:-101,102,107 who is working into deptno 10 that is should pouplate into the empno field. How Can I achieve this one because am new to the oracle forms.
     
  8. sambuduk

    sambuduk Forum Advisor

    Messages:
    242
    Likes Received:
    73
    Trophy Points:
    455
    Location:
    Hyderabad , Telangana
    Hi ,

    Do you want those values (101,102,107) in LOV ?? Or You want to display all those values in a single filed ?

    Regards
    Sambasiva Reddy.K
     
    dinesh songra likes this.
  9. RG Hegde

    RG Hegde Forum Advisor

    Messages:
    185
    Likes Received:
    35
    Trophy Points:
    310
    Location:
    Pune
    Hello ,

    If you want those values in LOV Sambasiva Reddy has already provided the query to be added in record group.
    If not can you provide the screen shot of your form where actually you are expecting to print the employee number.

    It will help us to understand your requirement ...
     
    dinesh songra likes this.
  10. dinesh songra

    dinesh songra Active Member

    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    55
    Thanks Expert ,

    But am not getting the value in the dept lov dynamically,I want those values (101,102,107) in LOV while am selecting respective dept no
    Could You please help me out for this issue
    .
     
  11. RG Hegde

    RG Hegde Forum Advisor

    Messages:
    185
    Likes Received:
    35
    Trophy Points:
    310
    Location:
    Pune
    Hello Dinesh,
    The value (101,102,107) are emp number in dept number 10 right.
    if you select dept number as 10 in the field emp the LOV will show the value (101,102,107) .

    As said could you please provide the design of your form .
     
  12. dinesh songra

    dinesh songra Active Member

    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    55
    Hello Expert,

    Good morning

    But am not getting the value in the dept lov dynamically,I want those values (101,102,107) in LOV while am selecting respective dept no
    Could You please help me out for this issue can you please help me out in this.

    Thanks&regards
    Dinesh kumar