Home » Developer & Programmer » Forms » Changing Record group for LOV at runtime (forms6i,oracle9i)
Changing Record group for LOV at runtime [message #362541] Tue, 02 December 2008 22:10 Go to next message
subba99
Messages: 31
Registered: September 2008
Member
hi
I have 2 record groups names RG1,RG2 ,I attached RG1 record group to LOV1 at design time,I want to change the record group RG1 to RG2 for LOV1 at runtime


if any knows please reply....urgent

Thanks in Advance

Regards
---------
subbu

[Updated on: Tue, 02 December 2008 22:11]

Report message to a moderator

Re: Changing Record group for LOV at runtime [message #362614 is a reply to message #362541] Wed, 03 December 2008 04:35 Go to previous messageGo to next message
Littlefoot
Messages: 20896
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I don't have Forms 6i, but Forms 10g offer the SET_LOV_PROPERTY built-in; it allows you to specify record group name, such as
set_lov_property(lov_id, group_name, 'rg2');
See if it is available in your Forms version too.
Re: Changing Record group for LOV at runtime [message #362627 is a reply to message #362541] Wed, 03 December 2008 06:15 Go to previous messageGo to next message
rajy_salim
Messages: 204
Registered: January 2008
Location: Beirut - Lebanon
Senior Member
It is available in Forms 6i too.
You can also use the LOV_NAME if you don't want to use the ID.
For more information, refer to the help system of forms builder by looking for "SET_LOV_PROPERTY".

Rajy
Re: Changing Record group for LOV at runtime [message #362749 is a reply to message #362627] Thu, 04 December 2008 01:01 Go to previous messageGo to next message
subba99
Messages: 31
Registered: September 2008
Member
Thanks to littlefoot and rajy for you are response


If u don't mind can u please send me the code ,and also send in which trigger it is possible




Thanks&Regards
--
subba
Re: Changing Record group for LOV at runtime [message #362757 is a reply to message #362749] Thu, 04 December 2008 01:22 Go to previous messageGo to next message
Littlefoot
Messages: 20896
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
It's all in Forms Online Help System. Do some research by yourself, write the code and - if you fail to make it work - do come back, show us what you did and someone will take a look.

As you want to modify record group during runtime, I'm afraid that it is you who should know *when* to do it; it also means that you should know which trigger to use.
Re: Changing Record group for LOV at runtime [message #362767 is a reply to message #362541] Thu, 04 December 2008 01:40 Go to previous messageGo to next message
*munnabhai*
Messages: 157
Registered: March 2008
Location: Riyadh
Senior Member
DECLARE
lov_id LOV;
BEGIN
lov_id := Find_LOV('My_LOV_1');
IF Get_LOV_Property(lov_id,GROUP_NAME) = 'GROUP1' THEN
Set_LOV_Property(lov_id,GROUP_NAME,'GROUP2');
ENDIF;
END;


Hope this will work for you....

Regards
Re: Changing Record group for LOV at runtime [message #362770 is a reply to message #362541] Thu, 04 December 2008 01:51 Go to previous messageGo to next message
rajy_salim
Messages: 204
Registered: January 2008
Location: Beirut - Lebanon
Senior Member
Please read The Forum Guidelines to learn how to use tags and format your post.

Change the record group before trying to open the LOV (choose another trigger).

Rajy
Re: Changing Record group for LOV at runtime [message #534770 is a reply to message #362770] Thu, 08 December 2011 23:28 Go to previous messageGo to next message
swapnil_naik
Messages: 269
Registered: December 2009
Location: Mumbai
Senior Member

I m doing same what u suggest but still my lov show first record group (RG1) values when i run form

My code like this :
-------------------

lov1 : SELECT id,first_name,city FROM EMPLOYEE

RG1 : SELECT id,first_name,city FROM EMPLOYEE

RG2 : SELECT ID,FIRST_NAME,LAST_NAME FROM EMPLOYEE

MY CODE :
----------
DECLARE
lov_id LOV;
status BOOLEAN ;
BEGIN

lov_id := Find_LOV('LOV1');

IF Get_LOV_Property(lov_id,GROUP_NAME) = 'RG1' THEN
Set_LOV_Property(lov_id,GROUP_NAME,'RG2');
message('1');
message('1');
END IF;

status := show_lov(lov_id);

END;

But it still shows RG1 query... what should i do ...

Re: Changing Record group for LOV at runtime [message #534787 is a reply to message #534770] Fri, 09 December 2011 03:55 Go to previous messageGo to next message
cookiemonster
Messages: 12406
Registered: September 2008
Location: Rainy Manchester
Senior Member
Is the message being displayed?
Re: Changing Record group for LOV at runtime [message #534877 is a reply to message #534787] Fri, 09 December 2011 23:31 Go to previous messageGo to next message
swapnil_naik
Messages: 269
Registered: December 2009
Location: Mumbai
Senior Member

yes cookie,

message displayed
Re: Changing Record group for LOV at runtime [message #534935 is a reply to message #534877] Sat, 10 December 2011 08:11 Go to previous messageGo to next message
dhawalsachdeva
Messages: 8
Registered: December 2011
Location: India
Junior Member

You would better understand this if you refer the "Help" of Oracle Forms.
Re: Changing Record group for LOV at runtime [message #534989 is a reply to message #534935] Sat, 10 December 2011 19:51 Go to previous message
cookiemonster
Messages: 12406
Registered: September 2008
Location: Rainy Manchester
Senior Member
If you're changing the columns being selected it would sensible to change the LOV rather than the record group.
Otherwise the LOV is going to display with a column called city that contains last_name - are you sure that's not what's happening?
Previous Topic: popup menu- Row Functionality - Problem
Next Topic: please help me :(
Goto Forum:
  


Current Time: Tue Dec 06 04:38:58 CST 2016

Total time taken to generate the page: 0.11154 seconds