how textbox disable and accept only from lov [message #195361] |
Thu, 28 September 2006 04:15 |
mfa786
Messages: 210 Registered: February 2006 Location: karachi
|
Senior Member |
|
|
hi master
sir
my user some time feed rough data i want to restric that he only select value from lov not give from key board mu text bot disable and accept only lov
please give me idea how textbox disable and accept only from lov
some body give me this idea
=======
use a text-item
link in the item your lov and check "Validate from List" to Yes
set "Enabled" to Yes
set "Insert Allowed" to No
set "Update Allowed" to No
=========
i set this property
Validate from List= Yes
Enabled= Yes
Insert Allowed= No
Update Allowed= No
but my textbox total enable = no
when i press F9 system not show the lov
no curser inter in text box
please give me idea how only lov work
thanking you
aamir
[Updated on: Fri, 29 September 2006 01:11] by Moderator Report message to a moderator
|
|
|
|
|
Re: how textbox disable and accept only from lov [message #195743 is a reply to message #195729] |
Mon, 02 October 2006 01:55 |
h_jitendras
Messages: 36 Registered: October 2006
|
Member |
|
|
1.Go to the module you need to create a LOV in.
2.Got to LOV.Use LOV wizard.
3.Type in the SQL query or hard-code the values you want the user to select from.
4.Select LOV column from the Record Group column
5.Click on Lookup Return Item(Select the particular text item).
6.Click on Finish.
7.Go to the Text item Property Palette|LOV property to LOV number.
8.In PL/SQL editor write the following on When-Mouse-Down trigger.
declare
lovvalue boolean;
begin
lovvalue :=show_lov('<the name of the LOV>');
end;
Try doing the same and it should work.
Thanks.
|
|
|
Re: how textbox disable and accept only from lov [message #195770 is a reply to message #195361] |
Mon, 02 October 2006 05:34 |
sameer_am2002
Messages: 129 Registered: September 2002
|
Senior Member |
|
|
First of all the thing which you are trying to do is useless...if your item is based on Lov and validate from list then why in first place you need to set update and insert property to false...coz anyways the textbox is not going to validate any invalid data..so the user is forced to enter valid data..Can you give me the reason why you want to disable those two properties..Then maybe we can find a solution..
|
|
|
Re: how textbox disable and accept only from lov [message #195902 is a reply to message #195770] |
Tue, 03 October 2006 01:54 |
raizen_underground
Messages: 28 Registered: September 2006 Location: Manila, Phillipines
|
Junior Member |
|
|
Try this one....
If you already have ur LOV and and the lookup return value is in the correct item.....just set ur text item property
insert allowed = no
update allowed = no
then create trigger in the text item
when-mouse-click
set_item_property('block.item',insert_allowed, property_true);
set_item_property('block.item',update_allowed, property_true);
if show_lov('LOV name') then
null;
end if;
set_item_property('block.item',insert_allowed, property_false);
set_item_property('block.item',update_allowed, property_false);
I've already code this and it works...
just reply if there is an error with this code...
raizen....
|
|
|
Re: how textbox disable and accept only from lov [message #196635 is a reply to message #195361] |
Fri, 06 October 2006 05:36 |
shahidmughal
Messages: 91 Registered: January 2006 Location: Faisalabad Pakistan
|
Member |
|
|
hi
there is a better solution of this problem
don't disable the field
just make the following changes
update allowed = no
insert allowed = no
then
in the property pallete
of the desired item
go to List of values node
and make the following change
validate from list = y
it will check the value if it is not in the lov then list will be displayed
i hope this will fulfil your requirement.
regards
Muhammad Shahid Mughal
|
|
|