dependent LOV in oracle forms [message #628212] |
Fri, 21 November 2014 05:38 |
|
mist598
Messages: 1195 Registered: February 2013 Location: Hyderabad
|
Senior Member |
|
|
Hi all,
I developed Table Base Block form, having with order_number, order_name(database),but no data in the base Table
I need to create LOV On order_number, if i select order_number from LOV , need to display the order_name automatically
select order_name from order_table
where order_name=1111
can you please help me on this?
Thanks
|
|
|
|
|
|
|
|
Re: dependent LOV in oracle forms [message #628221 is a reply to message #628220] |
Fri, 21 November 2014 08:14 |
cookiemonster
Messages: 13963 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
Or just it to the LOV query and make the LOV return it to the appropriate item. And if you don't want it to display in the LOV itself set the column width in the LOV to 0.
You'll still need the post-query trigger.
|
|
|
Re: dependent LOV in oracle forms [message #628222 is a reply to message #628219] |
Fri, 21 November 2014 08:25 |
|
mughals_king
Messages: 392 Registered: January 2012 Location: pakistan
|
Senior Member |
|
|
its simple download this example tested .fmb file as far as concern "SELECT QUERY".
create table test2(order_no varchar2(6),order_name varchar2(20));
insert into test2 values('1001','CARS');
insert into test2 values('1002','PHONES');
-----WHEN-MOUSE-DOUBLECLICK--------
declare
a boolean;
begin
a:=show_lov('lov71');
Select order_name into :block_name.order_name from test2 where order_no=:test2.order_no;
END;
IN LOV "Column Mapping properties" >>
column Names: order_no
return item : test2.order_no
and in Record Group>>>
"Record Group Query"
SELECT ALL test2.order_no FROM test2 ;
Regards
Mughal
[Updated on: Fri, 21 November 2014 08:27] Report message to a moderator
|
|
|
|
|
|
Re: dependent LOV in oracle forms [message #628227 is a reply to message #628225] |
Fri, 21 November 2014 08:47 |
cookiemonster
Messages: 13963 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
WHEN-MOUSE-DOUBLECLICK?
Why?
Either put the column in the LOV and let it take care of it, or write a select in WVI as LF suggested.
Mouse triggers make absolutely no-sense for this.
|
|
|
|
|
|
|
|
Re: dependent LOV in oracle forms [message #628314 is a reply to message #628220] |
Sun, 23 November 2014 22:51 |
|
mist598
Messages: 1195 Registered: February 2013 Location: Hyderabad
|
Senior Member |
|
|
Hi Littlefoot..
Quote:
Select ORDER_NAME in WHEN-VALIDATE-ITEM trigger on ORDER_NUMBER item, as well as in POST-QUERY block level trigger.
WHEN-VALIDATE-ITEM trigger on ORDER_NUMBER
select ORDER_NAME into :block.ORDER_NAME from table
where ORDER_NUMBER=:=:block.ORDER_NUMBER;
and post-query at block level also
So, i am selecting order_no from LOV, but here the ORDER_NAME value is displaying automatically in that Filed, it is displaying after i moved the cursor from order_no to order_name
and i tried with cookiemaster approach, it is fine.
I am taking 2 columns order_no,order_name and set the return item for both individually, but when i close to the Main Window of the canvas , Showing the LOV of order_name and at the Tool Bar i am getting error frm 40212 invalid value for field order_name
[Updated on: Sun, 23 November 2014 22:52] Report message to a moderator
|
|
|
|