Home » Developer & Programmer » Forms » Returning Lov value to More than 1 field.
Returning Lov value to More than 1 field. [message #159501] Mon, 20 February 2006 01:09 Go to next message
nirmalnarayan
Messages: 261
Registered: April 2005
Location: India
Senior Member
hi,

i Have two fields 'From Department' and 'To Department' in a form, i have a lov LOV_DEPT which will show all the department names, this lov need to be attached to both the above said fields and should return the selected department name to these fields, based on from which field the lov value was selected. I don't want to add any extra code , how can i achieve this functionality.

Thanks

Nirmal
Re: Returning Lov value to More than 1 field. [message #159503 is a reply to message #159501] Mon, 20 February 2006 01:16 Go to previous messageGo to next message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
nirmalnarayan wrote on Mon, 20 February 2006 08:09

I don't want to add any extra code , how can i achieve this functionality.
You don't want any extra coding, so why don't you base 2 LOVs on the same record group? That's not very much code to write...

MHE
Re: Returning Lov value to More than 1 field. [message #159561 is a reply to message #159503] Mon, 20 February 2006 05:24 Go to previous messageGo to next message
nirmalnarayan
Messages: 261
Registered: April 2005
Location: India
Senior Member
Hi,

I don't want to use 2 Lov's with same query either. I am attaching this LOV with the two text fields, so that it should identify the text field and return the values to the text field which invoked the LOV , this is the minimum expected functionality from a LOV attached to a text field, is something like this not possible without creating 2 LOV's based on same record group.

Thanks and Regards,
Nirmal
Re: Returning Lov value to More than 1 field. [message #159567 is a reply to message #159561] Mon, 20 February 2006 05:59 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
How about creating such a query (in Record Group)?

SELECT e.empno en_first, e.empno en_second
from emp;

Now you could return first value to one field in the block, and second value to another field in the block (and they would both be the same).
Re: Returning Lov value to More than 1 field. [message #159581 is a reply to message #159567] Mon, 20 February 2006 06:31 Go to previous messageGo to next message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
That would mean that both fields will always have the same value.

With very few lines of code, this should be possible but I don't have Forms here, so I can't check.

MHE

[Updated on: Mon, 20 February 2006 06:33]

Report message to a moderator

Re: Returning Lov value to More than 1 field. [message #159690 is a reply to message #159581] Mon, 20 February 2006 23:31 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
The reason that you can't have the same LOV associated with two fields is that a single LOV may contain multiple columns which populate multiple fields. Hence, each LOV can only point to a single set of fields.

David
Previous Topic: how to query records through forms6i
Next Topic: Changing in form with table
Goto Forum:
  


Current Time: Fri Sep 20 05:36:42 CDT 2024