Home » Developer & Programmer » Forms » how to change the LOV column mapping dyamically ?
how to change the LOV column mapping dyamically ? [message #383478] Thu, 29 January 2009 00:24 Go to next message
raj2011
Messages: 5
Registered: January 2009
Location: MANAMA
Junior Member

Hi,

i have created an LOV at design time. i want to assign this LOV to more then one column in a form.

how to change the LOV column mapping dyamically ?

REgards

Raj
Re: How to change LOV Column Mapping Dynamically ? [message #383491 is a reply to message #383478] Thu, 29 January 2009 00:33 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
You can't. Create an LOV for each item and reuse the 'record_group'.

David
Re: How to change LOV Column Mapping Dynamically ? [message #383507 is a reply to message #383491] Thu, 29 January 2009 00:48 Go to previous messageGo to next message
azamkhan
Messages: 557
Registered: August 2005
Senior Member
Yes I completely agree with David. And why make things complicated. Simple Logic is the BEST LOGIC.

Azam Khan
Re: How to change LOV Column Mapping Dynamically ? [message #383532 is a reply to message #383491] Thu, 29 January 2009 01:47 Go to previous messageGo to next message
raj2011
Messages: 5
Registered: January 2009
Location: MANAMA
Junior Member

Hi david,

I have column 1, column 2 column 3 in a form. i created a LOV and record group at design time. I have attached the LOV to column 1, it's working fine.

i want to attach the same LOV to column 2 and column 3, i don't want to create a separate LOV for column 2 and column 3 since the select statement for record group is same.

what i want to do is the return value from the LOV is currently assigned to column 1 , how can i re use the same LOV but it has to point the return value to column 2 and column 3 ?

is it possible ?

Regards
Re: How to change LOV Column Mapping Dynamically ? [message #383537 is a reply to message #383532] Thu, 29 January 2009 02:01 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
If SELECT statement used in Record Group is the same for all three items, does it mean that column mapping is the same as well? If so, I guess that you can create only one Record Group + List of Values which will be used as a LoV for all three items.

On the other hand, you can re-use the existing Record Group and base three different LoV's on the same record group if column mapping is different in all three cases (LoV on the first item populates first item; LoV on the second item populates second item ...). In that case, I guess that the simplest way to do the job is to create 3 LoVs based on 1 Record Group.
Re: How to change LOV Column Mapping Dynamically ? [message #383554 is a reply to message #383537] Thu, 29 January 2009 02:47 Go to previous messageGo to next message
raj2011
Messages: 5
Registered: January 2009
Location: MANAMA
Junior Member

Hi

thanks for your reply, in this case i will create 3 LOV and 1 record group

is there anyway dynamically i can use 1 LOV and change the column mapping return value for column 1 , column 2 and column 3?

Regards
Re: How to change LOV Column Mapping Dynamically ? [message #383557 is a reply to message #383554] Thu, 29 January 2009 02:58 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
According to Forms Online Help System, yes; I've checked what the documentation says:
Forms Help
You can accomplish this by using global variables or form parameters as return items in conjunction with the SHOW_LOV built-in subprogram.
Read more about it in the "Reusing an LOV" Help article.
Re: how to change the LOV column mapping dyamically ? [message #383570 is a reply to message #383478] Thu, 29 January 2009 03:29 Go to previous message
ganesh_jadhav0509
Messages: 74
Registered: May 2007
Location: Chester
Member

One way i think is,

Just create one dummy column assign LOV to that column.
and just write trigger on colmn which you want to show LOV like go_item and list_item and then key_list_item.
Eg.
you have 3 columns in block
col1,col2,col3
and you want to show same lov on col1 and col2 and create one dummy column as dummy1 then just write on when_new_item_instance
go_item('dummy1');
list_values;

then write code on key_list_val to assign the value to col1 or col2.

Regards,

Ganesh Jadhav.
Previous Topic: I want to know the sample code to use mscomm.ocx
Next Topic: Select statement return the value according to specified parameters
Goto Forum:
  


Current Time: Mon Feb 03 18:07:06 CST 2025