LOV Problem [message #240988] |
Mon, 28 May 2007 02:46 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
sweetkhaliq
Messages: 200 Registered: April 2006
|
Senior Member |
![sweetkhaliq%40yahoo.com](/forum/theme/orafaq/images/yahoo.png)
|
|
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 #241020 is a reply to message #240988] |
Mon, 28 May 2007 03:57 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
sweetkhaliq
Messages: 200 Registered: April 2006
|
Senior Member |
![sweetkhaliq%40yahoo.com](/forum/theme/orafaq/images/yahoo.png)
|
|
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 message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
|
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 #241060 is a reply to message #240988] |
Mon, 28 May 2007 04:48 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
|
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 message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
sweetkhaliq
Messages: 200 Registered: April 2006
|
Senior Member |
![sweetkhaliq%40yahoo.com](/forum/theme/orafaq/images/yahoo.png)
|
|
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 #241865 is a reply to message #240988] |
Wed, 30 May 2007 14:48 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
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 #241956 is a reply to message #240988] |
Thu, 31 May 2007 03:40 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
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.
|
|
|