|
|
|
|
Re: decode in formula column in oracle form [message #604958 is a reply to message #603683] |
Mon, 06 January 2014 09:21 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](//www.gravatar.com/avatar/de7cb9ed629f44606fd5e54948eaa7bf?s=64&d=mm&r=g) |
sreekumar.nair.it
Messages: 16 Registered: January 2014
|
Junior Member |
|
|
Hi,
For this requirement, I will proceed with the following assumptions:
1) User first enter value in DEM_QTY and DEM_AMOUNT field, then tab out to the next item RATE.
2) In KEY-NEXT-ITEM of RATE field, our logic will check the RATE field value
and populate the same with the required value as follows:
KEY-NEXT-ITEM of RATE field
----------------------------
BEGIN
SELECT decode(:BLOCK_NAME.rate,null,:BLOCK_NAME.dem_amount,:BLOCK_NAME.dem_qty * :BLOCK_NAME.rate)
into :BLOCK_NAME.RATE
from dual;
END;
The triggering event may change as per the requirement. As your requirement was not detailed one, I have used KEY-NEXT-ITEM.
Please let me know if you have any query.
Regards,
Sreee
|
|
|
|
Re: decode in formula column in oracle form [message #605671 is a reply to message #604965] |
Mon, 13 January 2014 05:54 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
![](//www.gravatar.com/avatar/de7cb9ed629f44606fd5e54948eaa7bf?s=64&d=mm&r=g) |
sreekumar.nair.it
Messages: 16 Registered: January 2014
|
Junior Member |
|
|
Hi cookiemonster,
Thank you for your kind reply. Going forward I will use the tag mentioned for code formatting.
I know WHEN-VALIDATE-ITEM is the preferred option, just for giving an example I have used KEY-NEXT-ITEM and for that reason, I have already
mentioned in my post that the triggering event may change as per requirement.
Regards,
Sreee
|
|
|