Home » Developer & Programmer » Forms » choose which lov to show (Forms 9i)
choose which lov to show [message #655409] Tue, 30 August 2016 12:16 Go to next message
redeemer
Messages: 10
Registered: August 2016
Junior Member
hi all.

I've a form in which I've 2 Radio buttons and one button that is suppose to call one lov in the search block. The thing is, that when I press that button, it has to select which lov it will show (and they show different values). I also created 2 lovs (lov1 and lov2) and 2 record groups (rg1 and rg2).

Simplifying, what I need is to call lov1 if Radio_Button=1 and lov2 if Radio_Button=2.

can you please help me? i'm using forms 9i.

thnks Wink





[Updated on: Tue, 30 August 2016 12:27]

Report message to a moderator

Re: choose which lov to show [message #655414 is a reply to message #655409] Tue, 30 August 2016 14:13 Go to previous messageGo to next message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Looks like an IF-THEN-ELSE structure to me (just like you said, literally). So, why wouldn't you give it a try?
Re: choose which lov to show [message #655417 is a reply to message #655414] Tue, 30 August 2016 17:32 Go to previous messageGo to next message
redeemer
Messages: 10
Registered: August 2016
Junior Member
and I did.

i tried even with show_lov but nothing happened :S
Re: choose which lov to show [message #655423 is a reply to message #655417] Wed, 31 August 2016 01:21 Go to previous messageGo to next message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Well, it is difficult to debug code you can't see. Would you mind share it so that someone might try to assist?
Re: choose which lov to show [message #655434 is a reply to message #655423] Wed, 31 August 2016 03:34 Go to previous messageGo to next message
redeemer
Messages: 10
Registered: August 2016
Junior Member
I've this on the trigger when-button-pressed


IF :srch.radb = 1 THEN
SET_ITEM_PROPERTY(LOV_NAME, 'LOV1');

ELSE
SET_ITEM_PROPERTY(LOV_NAME, 'LOV2');

END IF;

go_block('main');
execute_query;

[Updated on: Wed, 31 August 2016 03:39]

Report message to a moderator

Re: choose which lov to show [message #655437 is a reply to message #655434] Wed, 31 August 2016 04:25 Go to previous messageGo to next message
redeemer
Messages: 10
Registered: August 2016
Junior Member
problem solved Wink

I changed It to this:



DECLARE
var_lov BOOLEAN;

BEGIN
IF :srch.radb = 1 THEN
var_lov := SHOW_LOV('LOV1');
IF var_lov THEN
NULL;
END IF;
ELSE
var_lov := SHOW_LOV ('LOV2);
IF var_lov THEN
NULL;
END IF;
END IF;

GO_BLOCK('main');
EXECUTE_QUERY;
END;
Re: choose which lov to show [message #655452 is a reply to message #655437] Wed, 31 August 2016 05:38 Go to previous message
cookiemonster
Messages: 13917
Registered: September 2008
Location: Rainy Manchester
Senior Member
Please read and follow How to use [code] tags and make your code easier to read?

The two inner IF's are completely pointless.
Previous Topic: FRM 40200 : FIELD IS PROTECTED AGAINST UPDATE. BUT UPDATE IS SET TO YES
Next Topic: FRM-40738 ERROR IN ORACLE FORMS
Goto Forum:
  


Current Time: Fri Mar 29 06:21:11 CDT 2024