Avatar of chalie001
chalie001
 asked on

read only text item with lov

hi am in oracle 11gR2 how can i get a read only text item with lov in oracle forms i just what to select value in lov and attach it in my textitem and insert it use cannot type only the value attach by lov must be saved
my lov is

BEGIN
	copy(:cal_erd_link.focusobject,'cal_erd_link.obj_child');
  go_item('cal_erd_link.obj_parent');
  do_key('List_values');
  copy ('0', 'GLOBAL.save_mouse_record');
END;

Open in new window


i what the textitem to be grey out /disable user cannot enter value
Oracle Database

Avatar of undefined
Last Comment
chalie001

8/22/2022 - Mon
chalie001

ASKER
i don't want the user typing in the field, then i could modify my When-Button-Pressed trigger to set the Update Allowed property to TRUE, to let my LOV set the value and then set the Update Allowed property FALSE again
ASKER CERTIFIED SOLUTION
Helena Marková

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Mark Geerlings

It looks like your Oracle database version is 11gR2, but the more important issue here is not the database version, but your Oracle Forms version.  Which version of Oracle Forms do you have?  I think any version from Forms6 - Forms11 can work with an 11gR2 database.

You say that want the text item to be greyed out and/or disabled, so the user cannot enter a value, but yet you want the user to be able to "select value in lov and attach it in my text item and insert it".

In Oracle Forms, if the item is disabled, the user will not be able to choose a value from an LOV for that item.  I think you will need the item to be enabled (and not greyed out) so the user can use an LOV on that item.  You can add a WHEN-VALIDATE-ITEM trigger to make sure that whatever value the user chooses (or types in manually) matches a valid value that is in the LOV.
chalie001

ASKER
correct
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck