This content has been marked as final. Show 7 replies
user650888 wrote:Try this on your trigger,
I have two text items
On when-mouse-doubleclick trigger of text item 1, I mentioned the following:
:block.text_item2 := :block.text_item1
Meaning, as soon as we double click on text_item1, the text in text_item1 gets copied to text_item2
There is an LOV on text_item1, So after applying the when-mouse-doubleclick....
If text_item1 and text_item2 are not the same, If I double click on text_item1, lov appers, I press cancel because I dont want to change anything, but now the text in
text_item2 changes because of when-mouse-doubleclick on text_item1 (Gets copied)
How can I make it possible that if I press cancel on LOV of text_item1, the text in text_item2 does not get copied from text_item1 ?
Hope this works..
declare v_value varchar2(500); begin v_value:=:block.text_item1; list_values; if v_value <>:block.text_item1 then :block.text_item2 := :block.text_item1; end if; end;
Just want to clarify the if condition in Hamid's solution..
if v_value < .> :block.text_item1 then ....The inequality is unclear o_O i have just put a point to be displayed in forum
You can use SHOW_LOV instead of LIST_VALUES. this returns TRUE if the user chose a record and FALSE if the lov was cancelled.
show_lov does not work
V_LOV := SHOW_LOV('my_LOV');
I used the above, it did not work
you can create a parameter. In the when-new-item-instance of text_item1 assign it's value as -
:parameter.param1 := :block.text_item1;
then, at your double click.. compare the value
IF :parameter.param1 = :block.text_item1
don't change value for text_item2
Edited by: 987583 on May 3, 2013 4:38 AM
dear friend try this
when-validate-trigger on : :text_item1
if :text_item1 is null then
elsif :text_item1 is not null then
:text_item2 := :text_item1;
What does "it did not work" mean? is the lov not shown? Is the return not ok for you?