APEXblog.nl - Tips and Tricks

About This Blog:
I (Richard Weug) started this blog primary for myself to save all kinds of Apex tips and tricks in one place. To use it as a place to write down how I used some coding in my own projects, but also to copy and paste all kinds of articles I find on the Internet. (So I never have to wonder on what website did I read about??? When I see something interesting I collect the content so I have my own archive/knowlegde base.

View my profile on LinkedIn

 

Tips & Tricks

Print
09
Feb

Compare before and after values

Written by Richard Weug. Posted in Tips and Tricks

On OTN I found an article what makes it very simple to compare to values (before and after)

On a form you create an item which is hidden.
On page load,. you run a computation, that returns the value of a field into the hidden field

This might be a bit confusing,.. but as this is my place to put my tips and reminders,.. I know what to to with this ;-)

 

This is a part of the article,..

1. added :P3_RECEIVE_DATE_BEFORE - hidden
2. Computation "before regions" P3_RECEIVE_DATE_BEFORE

begin return :P3_RECEIVE_DATE; end; 


It saves initial value of P3_RECEIVE_DATE
3. Validation P3_RECEIVE_DATE

begin if TO_DATE(:P3_RECEIVE_DATE,'dd-MON-YYYY') < sysdate then return false; else return true; end if; end; 

This validation is conditional - it's executed only if P3_RECEIVE_DATE_BEFORE is not null

This is the link to the original article:

https://forums.oracle.com/forums/thread.jspa?threadID=2189189