Home » Developer & Programmer » Forms » if condition in post-change (10gR2, windows XP)
if condition in post-change [message #575420] Wed, 23 January 2013 02:06 Go to next message
7anona
Messages: 57
Registered: February 2012
Member
hello all..
I have a view t1
having the records:
1 A
1 A+
2 B
3 C
4 D

I want to display that in an LOV
but without the first record (1 A)
I used the code :

SELECT DISTINCT num, 
DECODE(num,1,(SELECT DISTINCT desc FROM t1 a
WHERE a.desc='A+'AND a.num=1),desc) desc
FROM t1 


this worked fine but
how to apply this in a post_change trigger where
a user inters the num and the desc appears in atext-item
in my form

I will appreciate any assistance
thanks in advance
Re: if condition in post-change [message #575425 is a reply to message #575420] Wed, 23 January 2013 03:29 Go to previous message
Littlefoot
Messages: 19887
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Wrong trigger; you should switch to WHEN-VALIDATE-ITEM (when inserting values) and POST-QUERY (when querying them). POST-CHANGE is here for backward compatibility - don't use it.

As of your question, regarding sample data you provided:
select max(t.description)
  into :block.description
  from your_table t
  where t.id = :block.id;

The same (MAX) goes for a LoV query.
Previous Topic: sql loader with Oracle forms 10g
Next Topic: WHEN MOUSE DOUBLE CLICK is not fired
Goto Forum:
  


Current Time: Fri Dec 19 04:55:50 CST 2014

Total time taken to generate the page: 0.20822 seconds