Home » Developer & Programmer » Forms » how textbox disable and accept only from lov
how textbox disable and accept only from lov [message #195361] Thu, 28 September 2006 04:15 Go to next message
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 #195496 is a reply to message #195361] Fri, 29 September 2006 01:29 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
I think your current form has a problem. You need to build a test form. Create a control block that is not based on a database table. Create a Record_Group. Create an LOV using this Record_Group. Put this LOV on your item. Make sure that the return value is defined to use this item. Compile, generate, and test this form. Once you get it working apply the same ideas to your current problem form.

David
Re: how textbox disable and accept only from lov [message #195729 is a reply to message #195496] Sun, 01 October 2006 22:51 Go to previous messageGo to next message
mfa786
Messages: 210
Registered: February 2006
Location: karachi
Senior Member
thank's for your reply
sir not result i create new form as per your instr. but not get right result

sir please give me step

thank
Re: how textbox disable and accept only from lov [message #195743 is a reply to message #195729] Mon, 02 October 2006 01:55 Go to previous messageGo to next message
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 Go to previous messageGo to next message
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 Go to previous messageGo to next message
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 Go to previous message
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
Previous Topic: FRM 40507 Unable to fetch next query record
Next Topic: Calling DB Procedure From Forms 6i ?
Goto Forum:
  


Current Time: Fri Apr 26 06:53:44 CDT 2024