Home » Developer & Programmer » Forms » LOV Problem
LOV Problem [message #240988] Mon, 28 May 2007 02:46 Go to next message
sweetkhaliq
Messages: 189
Registered: April 2006
Senior Member

Dear all
I am working in forms6i.
I have two LOV's
LOV_P_NO,
LOV_P_NAME
which have seperate groups.

When the user press F9 for list value it display alert which have two buttons.
button1:- List by Party Name
Button2:- List by Party ID

If user press on button one then name wise parties are display means party name is first column in list and if click on button2 then Party ID wise parties displayed means party id is first column.

But problem is that some time it diplays only one LOV either name wise lOV although i select the lov party ID wise. Or only display id wise LOV even i select name wise lov. I have run lov wizard of both lov but it display only that lov that wizard i have run last time.

Tell me what is the problem.

Thanks In Advance.

[Updated on: Mon, 28 May 2007 02:54]

Report message to a moderator

Re: LOV Problem [message #241015 is a reply to message #240988] Mon, 28 May 2007 03:49 Go to previous messageGo to next message
wency
Messages: 450
Registered: April 2006
Location: Philippines
Senior Member

Change it programmatically using this syntax.
set_item_property('blk.item', lov_name, 'lov_name');
Re: LOV Problem [message #241020 is a reply to message #240988] Mon, 28 May 2007 03:57 Go to previous messageGo to next message
sweetkhaliq
Messages: 189
Registered: April 2006
Senior Member

I have written the following code in the item key-listval trigger.
DECLARE
	  a_value_chosen BOOLEAN; 
	  alert_button number;
BEGIN 
	ALERT_BUTTON:=SHOW_ALERT('AL_LOV');
	IF ALERT_BUTTON=ALERT_BUTTON1 THEN
		a_value_chosen := Show_Lov('lov_p_no'); 
	    IF NOT a_value_chosen THEN 
	    	 Message('You have not selected a value.');
	    	 Bell; 
	    	 RAISE Form_Trigger_Failure; 
	    END IF;
	ELSIF ALERT_BUTTON=ALERT_BUTTON2 THEN
		a_value_chosen := Show_Lov('lov_p_name'); 
	  IF NOT a_value_chosen THEN 
	    Message('You have not selected a value.');
	  	Bell; 
	    RAISE Form_Trigger_Failure; 
	  END IF;
  END IF;
END;


[Updated on: Mon, 28 May 2007 04:10]

Report message to a moderator

Re: LOV Problem [message #241033 is a reply to message #240988] Mon, 28 May 2007 04:10 Go to previous messageGo to next message
wency
Messages: 450
Registered: April 2006
Location: Philippines
Senior Member

I'm not sure of an LOV accuracy if that LOV is not currently set for that item. I havn't tried that. Try to set the LOV for that item just before the show_lov. Post feedback here.
Re: LOV Problem [message #241043 is a reply to message #240988] Mon, 28 May 2007 04:23 Go to previous messageGo to next message
sweetkhaliq
Messages: 189
Registered: April 2006
Senior Member

It displays only that LOV that is set in the item property list of values.

suppose if the item propery
list of values = LOV_P_NO

then it will show only this lOV althou i have selected lov_p_name.

why this happens.
Re: LOV Problem [message #241060 is a reply to message #240988] Mon, 28 May 2007 04:48 Go to previous messageGo to next message
wency
Messages: 450
Registered: April 2006
Location: Philippines
Senior Member

Have you tried my suggestion?
set_item_property('blk.item', lov_name, 'lov_name');
set_item_property('blk.item', validate_from_list, property_true);
a_value_chosen := show_lov('lov_name');
Re: LOV Problem [message #241111 is a reply to message #240988] Mon, 28 May 2007 06:11 Go to previous messageGo to next message
sweetkhaliq
Messages: 189
Registered: April 2006
Senior Member

I write the code like this but it give error like this FRM-41091: Cannot find LOV: invalid ID.


Code:

DECLARE
	  a_value_chosen BOOLEAN; 
	  alert_button number;
BEGIN 
	ALERT_BUTTON:=SHOW_ALERT('AL_LOV');
	IF ALERT_BUTTON=ALERT_BUTTON1 THEN
        set_item_property('IMP_LOCAL_GOODS_FREIGHT.PID', lov_name, 'lov_p_no'); 
		a_value_chosen := Show_Lov('lov_p_no'); 
	    IF NOT a_value_chosen THEN 
	    	 Message('You have not selected a value.');
	    	 Bell; 
	    	 RAISE Form_Trigger_Failure; 
	    END IF;
	ELSIF ALERT_BUTTON=ALERT_BUTTON2 THEN
          set_item_property('IMP_LOCAL_GOODS_FREIGHT.PID', lov_name, 'lov_p_name'); 
		a_value_chosen := Show_Lov('lov_p_name'); 
	  IF NOT a_value_chosen THEN 
	    Message('You have not selected a value.');
	  	Bell; 
	    RAISE Form_Trigger_Failure; 
	  END IF;
  END IF;
END;





It did not work. Tell me what is the problem.

[Updated on: Mon, 28 May 2007 06:15]

Report message to a moderator

Re: LOV Problem [message #241211 is a reply to message #240988] Mon, 28 May 2007 20:13 Go to previous messageGo to next message
wency
Messages: 450
Registered: April 2006
Location: Philippines
Senior Member

Check first if you specified the correct lov name. you may also use find_lov function.
Re: LOV Problem [message #241237 is a reply to message #240988] Mon, 28 May 2007 23:45 Go to previous messageGo to next message
sweetkhaliq
Messages: 189
Registered: April 2006
Senior Member

LOV names are correct. But it still show same error.
without using set_Item_property. when i run the lov wizard of one of two lov's. It show only that LOV that i run wizard at very last time tell me what is the problem.
Re: LOV Problem [message #241239 is a reply to message #240988] Mon, 28 May 2007 23:46 Go to previous messageGo to next message
sweetkhaliq
Messages: 189
Registered: April 2006
Senior Member

Still waiting for reply.
Re: LOV Problem [message #241340 is a reply to message #240988] Tue, 29 May 2007 05:22 Go to previous messageGo to next message
sweetkhaliq
Messages: 189
Registered: April 2006
Senior Member

Can any body provide me solution of this problem.
Re: LOV Problem [message #241617 is a reply to message #240988] Wed, 30 May 2007 03:38 Go to previous messageGo to next message
wency
Messages: 450
Registered: April 2006
Location: Philippines
Senior Member

Lov name were correct, then did you get FRM-41091: Cannot find LOV: invalid ID?
Re: LOV Problem [message #241672 is a reply to message #240988] Wed, 30 May 2007 06:36 Go to previous messageGo to next message
sweetkhaliq
Messages: 189
Registered: April 2006
Senior Member

yes i got the same error FRM-41091: Cannot find LOV: invalid ID
Re: LOV Problem [message #241865 is a reply to message #240988] Wed, 30 May 2007 14:48 Go to previous messageGo to next message
hemavb
Messages: 103
Registered: May 2007
Location: Dubai , UAE
Senior Member
try writing the name of the LOV in the SET_ITEM_PROPERTY in CAPS.

another way is... remove the LOV setting from the Itme property.
keep only code in KEY-LISTVAL trigger.
Please donot forget to comment/remove the set_item_property() from the key-listval trigger.

Last resort, please check if you have written the trigger in the right field.
Re: LOV Problem [message #241902 is a reply to message #240988] Wed, 30 May 2007 23:40 Go to previous messageGo to next message
sweetkhaliq
Messages: 189
Registered: April 2006
Senior Member

if set the following property of item like this
list of values = NULL
validate from list = NO
and remarks the set_item_property

then it display nothing.

if i use set_item_property then it again give the same error. I also try the name in capital as well.

Is there any other solution of this problem.
thanks for reply.
Re: LOV Problem [message #241956 is a reply to message #240988] Thu, 31 May 2007 03:40 Go to previous message
hemavb
Messages: 103
Registered: May 2007
Location: Dubai , UAE
Senior Member
ok this is what you do...

1) Remove the LOV from the Item Properties. Make it null
2) Delete the existing key-listval from the item triggers.
3) Make a new Key-listval trigger for the Item for which you want to display the LOV. Write this code in it

DECLARE
   alert_button number;
BEGIN 
   ALERT_BUTTON:=SHOW_ALERT('AL_LOV');
   IF ALERT_BUTTON=ALERT_BUTTON1 THEN
      IF Show_Lov('lov_p_no') THEN 
         NULL;
      ELSE
   	 Message('You have not selected a value.');
    	 Bell; 
    	 RAISE Form_Trigger_Failure; 
      END IF;
   ELSIF ALERT_BUTTON=ALERT_BUTTON2 THEN
      IF Show_Lov('lov_p_name') THEN 
         NULL;
      ELSE
         Message('You have not selected a value.');
     	 Bell; 
	 RAISE Form_Trigger_Failure; 
      END IF;
   END IF;
END;


It should not give you any hassles.
Previous Topic: Set menu item property enabled/disabled
Next Topic: how get running total in grid
Goto Forum:
  


Current Time: Fri Dec 02 20:24:00 CST 2016

Total time taken to generate the page: 0.09029 seconds