Home » Developer & Programmer » Forms » Enable_list_lamp is not working (forms 10g)
Enable_list_lamp is not working [message #597280] Wed, 02 October 2013 12:44 Go to next message
georges.choueiry
Messages: 24
Registered: July 2008
Junior Member
i follow the below steps but the calendar lov and button are not shown

1- Go to property pallet of an item set "Subclass Information" TEXT_ITEM_DATE
2- In the field properties, under LOV, set Enable List lamp to Yes
3- Set Validate from List to No
4- Create a Trigger "key-list-val" at item level, code the following: calendar.show
5- Compile it and save.

any ideas?
Re: Enable_list_lamp is not working [message #597281 is a reply to message #597280] Wed, 02 October 2013 12:52 Go to previous messageGo to next message
joy_division
Messages: 4531
Registered: February 2005
Location: East Coast USA
Senior Member
What is list lamp?
Control-L brings up an LOV.
key-list-val is an invalid trigger type. Maybe you were thinking KEY-LISTVAL?
Re: Enable_list_lamp is not working [message #597283 is a reply to message #597281] Wed, 02 October 2013 12:58 Go to previous messageGo to next message
georges.choueiry
Messages: 24
Registered: July 2008
Junior Member
enable_list_lamp is a lov that exists in the template form.
it is used to show the calendar but it is not working
Re: Enable_list_lamp is not working [message #597284 is a reply to message #597283] Wed, 02 October 2013 13:02 Go to previous messageGo to next message
joy_division
Messages: 4531
Registered: February 2005
Location: East Coast USA
Senior Member
I'm not really following here.

What is a template form?
I do not underatand "set Enable List lamp to Yes." Where are you setting this. Be specific.
Re: Enable_list_lamp is not working [message #597287 is a reply to message #597280] Wed, 02 October 2013 13:53 Go to previous messageGo to next message
DrabJay
Messages: 32
Registered: May 2013
Member
I think you also need to attach a list-of-values to the item. This can be a dummy LoV, it should not matter as you have changed the Key-ListVal trigger.
Re: Enable_list_lamp is not working [message #597290 is a reply to message #597287] Wed, 02 October 2013 14:04 Go to previous messageGo to next message
georges.choueiry
Messages: 24
Registered: July 2008
Junior Member
i have attached the enable_list_lamp lov but it is not working the lov button doesn't appear and the CTRL+L is not working on this field
Re: Enable_list_lamp is not working [message #597304 is a reply to message #597290] Wed, 02 October 2013 15:20 Go to previous messageGo to next message
DrabJay
Messages: 32
Registered: May 2013
Member
You also need to ensure the forms/java/oracle/forms/registry/registry.dat file has the entry app.ui.lovButtons=true, by default it is set to false.
Re: Enable_list_lamp is not working [message #597305 is a reply to message #597290] Wed, 02 October 2013 15:20 Go to previous messageGo to next message
joy_division
Messages: 4531
Registered: February 2005
Location: East Coast USA
Senior Member
I am totally confused. What LOV button are you talking about? You created an LOV, not a button.

What property did you set to YES? You said "enable list lamp to yes" under LOV properties. There is no property called enable under LOV. I don't know what this means.

Give a detailed explanation. This is my last response unless you tell us exactly what you did and where.
Re: Enable_list_lamp is not working [message #597307 is a reply to message #597305] Wed, 02 October 2013 23:55 Go to previous messageGo to next message
georges.choueiry
Messages: 24
Registered: July 2008
Junior Member
dear Joy,

if u dont know what means enable_list_lamp LOV and for what we use it dont answer please.
Re: Enable_list_lamp is not working [message #597308 is a reply to message #597307] Thu, 03 October 2013 00:09 Go to previous messageGo to next message
Littlefoot
Messages: 19697
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
./fa/5767/0/ There you go, Joy!

Google says that it has to do something with Oracle Apps., but both of us don't know much about it, so ...

Georges, if your question really is specific to Oracle Apps., would you like us to move your question into that forum? Maybe you'll get the answer there (but I wouldn't bet on that, not many questions are answered there).
Re: Enable_list_lamp is not working [message #597315 is a reply to message #597308] Thu, 03 October 2013 01:59 Go to previous messageGo to next message
georges.choueiry
Messages: 24
Registered: July 2008
Junior Member
Thx littlefoot for your reply.

i am creating a customize form with the template provided by oracle. if i tried to open the calendar in an existing form it will popup but in my new form the button of the calendar LOV and the calendar LOV are not shown.

i tried many scenarios but i didn't find any solution.

i will appreciate if someone can resolve this issue.

regards,
Re: Enable_list_lamp is not working [message #597349 is a reply to message #597315] Thu, 03 October 2013 09:43 Go to previous message
mughals_king
Messages: 356
Registered: January 2012
Location: pakistan
Senior Member
Dear why you did not take help from google search engine i found many things regarding enable_list_lamp


1.Set the LOV of the item for which calendar to be attached as ENABLE_LIST_LAMP LOV, which is included in the TEMPLATE form.

2.Set Validate from List to 'No' in the property palette of that item .

3.Then in KEYLISTVAL trigger of that item write

calendar.show;
------------------------------------------
LOV for Date and Date time Fields

1. Make the field as "Text Item" and set the LOV to "ENABLE_LIST_LAMP"

2. Set validate from the List property for the Item to "No"

2. Create a Trigger "KEY-LISTVAL" for the Item with following code

calendar.show;

By default, the Calendar shows the month of the value in the date field
(if a value exists) upon first opening. If no specific date is supplied, the
Calendar shows the current month.

calendar.show([first_date]);


Set value of item/primary key using Sequence

:SEQUENCE. XXGL_ADP_SECURITY_HDR_SEQ.NEXTVAL in Intial value of the Item


Populate non database fields during Query in form

1. Create post query trigger on the Datablock

2. Set the fields by writing the code, in below example Employee number and name are non database
fields which are populate based on the value of field person id(Database field)
   
    PROCEDURE post_query is
    begin

        --Get the Person details
        SELECT ppf.EMPLOYEE_NUMBER , 
               ppf.FULL_NAME
               into     
               :MAIN.EMP_NUM,
               :MAIN.EMP_NAME
        FROM   per_all_people_f ppf
        WHERE  person_id =:MAIN.person_id
        AND    rownum =1;
        
        --To prevent status change of the block
        SET_RECORD_PROPERTY( :SYSTEM.TRIGGER_RECORD,'BLOCKNAME', STATUS,
QUERY_STATUS);

    end post_query;      
      
  
Display Messages in Oracle Forms:

--String Message
fnd_message.set_string ('SERial Num has been repaired more than 3 times '); 
fnd_message.show (); 

--Dictonary Message
FND_MESSAGE.Set_Name('FND','FORM_RECORD_CHANGED');
FND_MESSAGE.Error;

--Debug Messsage
FND_MESSAGE.DEBUG('ERROR');


Validate if the Record entered is a Duplicate Record

1. Create a ON-COMMIT trigger at form level and write below logic based on your requirement
   PROCEDURE on_commit is
    CURSOR c_person
    is
    SELECT rowid row_id,
           hdr_id
    FROM   STAGGING_TBL
    WHERE user_name =:BLOCK.user_name
    AND   nvl(person_id,'-999') = nvl(:BLOCK.person_id,'-999');
   
  BEGIN
         --Validate if there is existing record for Oracle user
         FOR c_preson_rec IN c_person
         LOOP
        IF c_preson_rec.row_id <> :BLOCK.row_id
        THEN
            FND_MESSAGE.Set_STRING('Record exist for this Oracle User');
            FND_MESSAGE.show;
            Raise FORM_TRIGGER_FAILURE;                  
        END IF;
             
         END LOOP;
   
  END;
         

Looping logic to perform validations
curr_record  := :SYSTEM.CURSOR_RECORD;
curr_item    := :SYSTEM.TRIGGER_ITEM;    
BEGIN
    go_block('BLOCK');
    First_Record;
    LOOP

        IF :BLOCK.PERSON_ID = person_id
        AND curr_record <> :SYSTEM.CURSOR_RECORD
        AND ( :BLOCK.START_DATE >= start_date OR :BLOCK.end_DATE <= end_date
              OR :BLOCK.END_DATE >= start_date OR :BLOCK.end_DATE <= end_date)
        THEN
            FND_MESSAGE.Set_STRING('Employee has mutliple records with Overlapping Dates');
            FND_MESSAGE.show;
               Raise FORM_TRIGGER_FAILURE;

        END IF;

        IF :System.Last_Record = 'TRUE' 
        THEN 
            EXIT;

        END IF;

    END LOOP;    



    Execute_Query;
    Go_Record( curr_record);
    go_item(curr_item);

END;

Querying on Non Database fields in Oracle Forms

1.  Sample Block :  EMPCCLOCOVD
               employee_name    -   Non database field.
               employee_number  -   Non database field.
               person_id        -   Database, hidden field


2. Add a Pre-Query trigger on the block , where it contains a non database fields for querying.

3. Sample code for the Pre - Query trigger :

  PROCEDURE pre_query IS      l_where    
   VARCHAR2(250) := 'Where 1 = 1';
  BEGIN
      l_where :=  l_where || 'AND person_id IN (SELECT person_id FROM per_all_people_f ppf '
               ||' WHERE EMPLOYEE_NUMBER like '''||'%'||:EMPCCLOCOVD.EMP_NUM||'%'')'
               ||' AND   FULL_NAME like '''||'%'||:EMPCCLOCOVD.EMP_NAME||'%'')';

        SET_BLOCK_PROPERTY('EMPCCLOCOVD',DEFAULT_WHERE,l_where);
  END pre_query;


POPULATE WHO COLUMNS in Oracle Forms:

Write the below code in PRE-INSERT, PRE-UPDATE at DATABLOCK LEVEL

FND_STANDARD.SET_WHO;

Datablock Order by Non database Column 
I need my header block order by NON DATABASE Column COUNTRY below is the value
that I need to have in ORDER BY Clause of the datablock

(SELECT ftt.territory_short_name from fnd_territories_tl ftt where   ftt.TERRITORY_CODE = country_code)




Previous Topic: Explain the code in KEY-CLRFRM
Next Topic: Chatting Application
Goto Forum:
  


Current Time: Sat Oct 25 11:05:26 CDT 2014

Total time taken to generate the page: 0.08757 seconds