Home » Developer & Programmer » Forms » how to change values in lov dynamically?
how to change values in lov dynamically? [message #233732] Fri, 27 April 2007 04:34 Go to next message
karthi_smarty04
Messages: 19
Registered: January 2007
Location: COIMBATORE
Junior Member
hi experts,

i have developed a form using forms 9i..
i used data block wizard and selected tabular format to display dataitems from the folloeing table..

table name : emp
fields
emp_id number(15) primary key
emp_name varchar2(20)
status varchar2(20)
status values are 'booked',available';


values in the table are
emp id emp_name status
1 alex booked
2 wasim available
3 varun available


my objective is to choose the employees who's status is 'available'
i have created an LOV (i have filtered the available employees alone')..up to here there is no problem..

my problem is ,
when i press ctrl+l in the first row of the tabluar the lov shows wasim and varun..suppose iam choosing wasim..
in the next row of the tabular the lov should show only varun who is available..
how should i get the desired output...please help me out..thanks in advance

Re: how to change values in lov dynamically? [message #233742 is a reply to message #233732] Fri, 27 April 2007 04:43 Go to previous messageGo to next message
karthi_smarty04
Messages: 19
Registered: January 2007
Location: COIMBATORE
Junior Member
i have tried to update the status in post_text trigger of the id_text_box (text box where lov is set ),

update emp
set status = 'booked'
where id = :emp.id_text_box;


its not working...please help me out
Re: how to change values in lov dynamically? [message #234157 is a reply to message #233732] Mon, 30 April 2007 04:14 Go to previous messageGo to next message
karthick2809
Messages: 50
Registered: April 2007
Location: Chennai
Member
i have got a solution

try to change the status of the emp in the post insert trigger..

it will work provided u save each and every record then and there.
u should save the current record b4 entering the next record..
try it out
Re: how to change values in lov dynamically? [message #234213 is a reply to message #233732] Mon, 30 April 2007 08:25 Go to previous messageGo to next message
sameer_am2002
Messages: 129
Registered: September 2002
Senior Member
But saving record each and every time is not feasable..What if the user doesnt want to save any records..The best idea would be to create save point during query. Then on each and every record you just post the record but dont commit..This means use Post built-in just to post the records..Then you can handle it normally according to the user whether he wants to save changes or no.
Re: how to change values in lov dynamically? [message #234531 is a reply to message #234213] Wed, 02 May 2007 01:04 Go to previous messageGo to next message
karthick2809
Messages: 50
Registered: April 2007
Location: Chennai
Member
hi sameer
thanks for your tips..could you please explain me how to create the save point and how to achieve what you have mentioned..stepwise explanation will be much helpful for me...
thanks in advance
Re: how to change values in lov dynamically? [message #234555 is a reply to message #233732] Wed, 02 May 2007 02:34 Go to previous messageGo to next message
sameer_am2002
Messages: 129
Registered: September 2002
Senior Member
Okzz..Verry simple not even need to define savepoint also..
Write a key-listval trigger instead of default LOV showing for your item.
if show_lov('lovname') then
Post;
end if ;

Re: how to change values in lov dynamically? [message #234840 is a reply to message #234555] Thu, 03 May 2007 05:13 Go to previous message
karthick2809
Messages: 50
Registered: April 2007
Location: Chennai
Member
thanks a lot
Previous Topic: Req Block Solution
Next Topic: Forms 6i or Forms 10g
Goto Forum:
  


Current Time: Sun Dec 04 15:04:38 CST 2016

Total time taken to generate the page: 0.11584 seconds