Home » Developer & Programmer » Forms » LOV & Radio Button Problem ??
icon5.gif  LOV & Radio Button Problem ?? [message #181226] Fri, 07 July 2006 09:40 Go to next message
qadeerahmed
Messages: 63
Registered: July 2006
Location: Pakistan
Member
HI!
I've a scenario as :-

In a form i've
Two Radio Buttons named as (BSE, BCE).
and 7 LOV's.

What I want to do is that, whenever student selects anyone of the option from radio button, either BSE or BCE, LOV's should be populated with there respective course lists.

Like e.g. if student selects BSE then all the 7 LOV's should be populated with the BSE courses list, And if student selects BCE then all the 7 LOV's should be populated with BCE courses list.

or SIMPLY AS WHEN RADIO CHANGED THEN LIST ITEMS SHOULD BE CHANGED


Can Anyone Help me out? How this can be done??

"IF IN LOV CASE ITS NOT POSSIBLE, THAN ALTERNATIVELY DO THIS FOR THE COMBOBOX"

Thanks in Advance !!!



Re: LOV & Radio Button Problem ?? [message #181228 is a reply to message #181226] Fri, 07 July 2006 09:53 Go to previous messageGo to next message
qadeerahmed
Messages: 63
Registered: July 2006
Location: Pakistan
Member
I think so there is no one who is capable of helping me out in this matter Smile
Sad
Re: LOV & Radio Button Problem ?? [message #181234 is a reply to message #181228] Fri, 07 July 2006 10:46 Go to previous messageGo to next message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
Wow, you waited a whole 13 minutes before coming back! Most people here do have jobs they get paid for so a little patience doesn't hurt...besides I think the response time at OraFAQ is acceptable.

Let me get you on the way:
Option 1: you can fill a lov dynamically. That is to say, you can assign a record group to a LOV (SET_LOV_PROPERTY). So what you could do is create record groups for each variant and set them in the when_radio_changed trigger.

Option 2: you can fill the record group for each LOV dynamically. You can fill a record group from a query

Option 3: you can build the record groups in such a way that they make use of the value of your radio group. You can reference items in record groyup queries.

All depends on how different the variants are.

MHE
Re: LOV & Radio Button Problem ?? [message #181262 is a reply to message #181234] Fri, 07 July 2006 12:53 Go to previous messageGo to next message
qadeerahmed
Messages: 63
Registered: July 2006
Location: Pakistan
Member
Thanks MHE !!!

For Option 1:
How can I set record groups in When_Radio_Changed trigger?
For Option 3:
How I can reference items in record group queries?

Any Idea What Should I Write in Trigger? code?
How LOV's can dynamically be filled?

And What do you mean by this ('All depends on how different the variants are')?????

Thanks !!!
Re: LOV & Radio Button Problem ?? [message #181289 is a reply to message #181262] Sat, 08 July 2006 04:30 Go to previous messageGo to next message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
qadeerahmed wrote on Fri, 07 July 2006 19:53

For Option 1:
How can I set record groups in When_Radio_Changed trigger?
SET_LOV_PROPERTY. Look it up in Forms help. You can set the record group with it. Just define 2 variants for each LOV and set the correct one in the radio group trigger.

qadeerahmed wrote on Fri, 07 July 2006 19:53

For Option 3:
How I can reference items in record group queries?
In your RG query you can use something like:
select <columns>
from   <yourtable> t
where  t.somecolumn = :yourblock.youritem


qadeerahmed wrote on Fri, 07 July 2006 19:53

How LOV's can dynamically be filled?
I just gave you 3 options.

qadeerahmed wrote on Fri, 07 July 2006 19:53

And What do you mean by this ('All depends on how different the variants are')?????
If the queries are very much alike you can use option 3 but if they do not resemble each other, you propably want to use option 1 (or Option 2 but that requires more coding).

MHE

[Updated on: Sat, 08 July 2006 04:32]

Report message to a moderator

Re: LOV & Radio Button Problem ?? [message #181365 is a reply to message #181289] Sun, 09 July 2006 05:08 Go to previous messageGo to next message
qadeerahmed
Messages: 63
Registered: July 2006
Location: Pakistan
Member
Hi!!!,

I write the following code, but it gives an error when i compile ...... 'identifier RG_1 and RG_2 must be declared'.

PROG= Name of LOV
PROGRAMES=Radio group name
RG_1= Record Group 1
RG_2= Record Group 2


IF :PROGRAMES='Value_of_button1' THEN
SET_LOV_PROPERTY('PROG',GROUP_NAME,RG_1);
SHOW_LOV('PROG');
ELSIF
:PROGRAMES='value_of_button2' THEN
SET_LOV_PROPERTY('PROG',GROUP_NAME,RG_2);
SHOW_LOV('PROG');
END IF;

can you plz write me a piece of code that works well with the given scenario???

Thanks very much
Re: LOV & Radio Button Problem ?? [message #181377 is a reply to message #181365] Sun, 09 July 2006 09:33 Go to previous messageGo to next message
RJ.Zijlstra
Messages: 104
Registered: December 2005
Location: Netherlands - IJmuiden
Senior Member
Hi,

From th 'HELP':

Set_LOV_Property(lov_id,GROUP_NAME,'GROUP2');

See the difference?

For a lot of questions the HELP system is more then sufficient. Use it; you paid for it.

HTH,

Rob Zijlstra
Re: LOV & Radio Button Problem ?? [message #181459 is a reply to message #181377] Mon, 10 July 2006 04:06 Go to previous messageGo to next message
qadeerahmed
Messages: 63
Registered: July 2006
Location: Pakistan
Member
ThankYou All, Who Helped me !!!
Its now Working >>>>>
Thanks Alot
Bye !!
Re:HELP!!!! LOV & Radio Button Problem ?? [message #181547 is a reply to message #181459] Mon, 10 July 2006 08:25 Go to previous messageGo to next message
qadeerahmed
Messages: 63
Registered: July 2006
Location: Pakistan
Member
THE SAME PROBLEM I WANT TO DO IT WITH COMBO BOX, AS THE USER SELECTS FROM COMBO BOX, AND THE VALUES SHOULD ALSO COME FROM TABLE, THE LOV SHOULD BE POPULATED RESPECTIVELY, PLZ ITS URGERNT
Re:HELP!!!! LOV & Radio Button Problem ?? [message #181554 is a reply to message #181547] Mon, 10 July 2006 08:51 Go to previous messageGo to next message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
qadeerahmed wrote on Mon, 10 July 2006 15:25

PLZ ITS URGERNT
Right, let me drop the work I'm paid for and start with your work then. Anyway, the same code, different trigger. A combo box, has a WHEN-LIST-CHANGED trigger. An alternative might be the WHEN-VALIDATE-ITEM.

PS: Your caps lock is stuck. Don't post uppercase only, it's rude. don't beg, it will not encourage us to go any faster. PLZ is not a member here. Use plain English please.

Come on, write that trigger! After all it was urgent.

MHE
Re:HELP!!!! LOV & Radio Button Problem ?? [message #181555 is a reply to message #181554] Mon, 10 July 2006 09:01 Go to previous messageGo to next message
qadeerahmed
Messages: 63
Registered: July 2006
Location: Pakistan
Member
Yeah Sure, but you missed one point, i also said that i want to populate the combobox values from the table how i'm gonna do that? Thanks!!! MHE Wink
Re:HELP!!!! LOV & Radio Button Problem ?? [message #181561 is a reply to message #181555] Mon, 10 July 2006 09:31 Go to previous messageGo to next message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
You can populate a list from a query or from a record group.

Example
example

MHE
Re:HELP!!!! LOV & Radio Button Problem ?? [message #181565 is a reply to message #181561] Mon, 10 July 2006 09:56 Go to previous messageGo to next message
qadeerahmed
Messages: 63
Registered: July 2006
Location: Pakistan
Member
Thanks MHE for Your Brisk Response Smile
Shortly i'll catch you up with new problem Smile

Thankyou ONCE again!
Re:HELP!!!! LOV & Radio Button Problem ?? [message #181571 is a reply to message #181565] Mon, 10 July 2006 10:55 Go to previous messageGo to next message
qadeerahmed
Messages: 63
Registered: July 2006
Location: Pakistan
Member
Hi,
Earlier Problem Solved Was About Filling The LOV's dynamically, but there was only one Text_Field Where LOV's Value was Returned.

Now i'm Facing Problem Like This:-
I've 4 Text_Fields, Whenever I Select Lov From Anyone of the Field, the return_Item remains Same, i.e. of First Text_Field(that was mentioned during LOV creation).

Now I want to do like this; Whenever I select Lov From Any of Text_Field, the return Item Should be of that same Text_Field.

e.g. If I Select LOV from Text_Field 2, It Should Return Value In that same Field.
It should not return the Value to the Field that was mentioned during the creation of LOV.

Hope so You Got My Point...

Thanks!!!

[Updated on: Mon, 10 July 2006 10:57]

Report message to a moderator

Re:HELP!!!! LOV & Radio Button Problem ?? [message #181614 is a reply to message #181571] Mon, 10 July 2006 17:04 Go to previous messageGo to next message
qadeerahmed
Messages: 63
Registered: July 2006
Location: Pakistan
Member
Hi,
Please Provide Solution to My Problem
Thanks!!

[Updated on: Tue, 11 July 2006 00:40]

Report message to a moderator

Re: LOV & Radio Button Problem ?? [message #181756 is a reply to message #181226] Tue, 11 July 2006 07:51 Go to previous messageGo to next message
qadeerahmed
Messages: 63
Registered: July 2006
Location: Pakistan
Member
does any one of you, have the solution??
Re: LOV & Radio Button Problem ?? [message #181762 is a reply to message #181756] Tue, 11 July 2006 08:03 Go to previous messageGo to next message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
You can base several LOV's on the same record group.

MHE
Re: LOV & Radio Button Problem ?? [message #181782 is a reply to message #181762] Tue, 11 July 2006 08:39 Go to previous messageGo to next message
qadeerahmed
Messages: 63
Registered: July 2006
Location: Pakistan
Member
Thanks MAHEER !

That means For Every Text Field, I've to Create Separate LOV,
i.e. Say, If I've 25 Text Fields In a Form, Then I've to Create 25 Separate LOV's ?

Regards !
Re: LOV & Radio Button Problem ?? [message #181790 is a reply to message #181782] Tue, 11 July 2006 09:04 Go to previous messageGo to next message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
Yes.

MHE
Re: LOV & Radio Button Problem ?? [message #182253 is a reply to message #181790] Fri, 14 July 2006 00:21 Go to previous messageGo to next message
qadeerahmed
Messages: 63
Registered: July 2006
Location: Pakistan
Member
hi!!!
I want to Populate the combo box that was initially populated from query, with the button press with different record group
and when form initializes it should retrieve the List of Values and populate the record group
thanks !!!
Re: LOV & Radio Button Problem ?? [message #182453 is a reply to message #182253] Sat, 15 July 2006 00:39 Go to previous messageGo to next message
qadeerahmed
Messages: 63
Registered: July 2006
Location: Pakistan
Member
answer me !!
Re: LOV & Radio Button Problem ?? [message #182517 is a reply to message #182253] Sun, 16 July 2006 01:33 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Use either Create_Group or Create_group_from_query. For examples search this forum, search the forms reference manual, or google it.

David
Re: LOV & Radio Button Problem ?? [message #182566 is a reply to message #182517] Mon, 17 July 2006 01:40 Go to previous message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
Look buddy, I do have a full time job, a family, a life outside OraFAQ. I am willing to help out as much as I can (so do others) but urging me to reply like:
Quote:

answer me !!
will most definitely not help. Au contraire, it will even stop me from jumping in immediately. Allow me to quote from the sticky:
Quote:

Be patient. A lot of people here are just browsing the board once a day.


MHE
Previous Topic: Oracle Forms in Bengali
Next Topic: Microsoft Tree Control
Goto Forum:
  


Current Time: Fri Sep 20 08:27:20 CDT 2024