You're reading...
Forms Personalization

Enforcing field entry in Forms Personalization

I received a requirement to make the Anticipated Date field on the Payment Batch form mandatory for all users if the Payment Method field is Electronic. It seemed to be a very straight forward requirement whereby I only check the value of the Payment Method field and make the Anticipated Date field property, Required = True, by personalizing the form.
What I did not realize was the fact that this form is a folder form. Hence this personalization would have no effect if the form folder view did not show Anticipated Date field. Had there been a folder where the Anticipated Date field was viewable from the beginning then it would work. I had a very difficult time figuring out what to do as I could not force the users to make the Anticipated Date field viewable from Folder > Show Field > Anticipated Date
I hit upon another idea. Why not check whether the field Anticipated Date has a value whenever the control moves out from the record and the user tries to click on a button? If there was no value in the field I could raise an error message and stop the user from proceeding further. This worked out and I later on used this method for many other requirements.
 
To personalize the form,
Open the Payment Batch
Navigate to Help > Diagnostics > Custom Code > Personalize
Condition
Personalization Condition
Set the values
Trigger Event: WHEN-VALIDATE-RECORD
Trigger Object: BAT_SUM_FOLDER
Condition: :BAT_SUM_FOLDER.PAYMENT_METHOD != ‘Check’ AND :BAT_SUM_FOLDER.ANTICIPATED_VALUE_DATE IS NULL AND :BAT_SUM_FOLDER.CHECK_DATE > TO_DATE (’27-JUN-2011′, ‘DD-MON-YYYY’)
The condition for 27-Jul-2011 was kept as this personalization went live on 27-Jul-2011. This meant that any payment batch created before 27-Jul-2011 would not be affected.
 
Actions
Personalization Action
Message Type: Error
Message Text: Please enter the Anticipated Value Date.
If this field is not shown on the form please make it viewable by going to the following path.
Path: Folder > Show Field > Anticipated Value Date
When we indicate to Oracle that an Error message is to be shown to the user, Oracle prevents further processing of data until the error has been rectified.
 
Now let us see the form in action.
Go to,
Responsibility: Payables responsibility
Navigation: Payments > Entry > Payment Batches
Create a payment batch
Notice that when we create a payment batch the field, Anticipated Value Date, is non mandatory even though the Payment Method is set to Electronic.
Click on Save or Actions.
Error message
The popup message appears. This message appears every time an action is tried until the user populates Anticipated Date field.  
 
About these ads

About Abhijit

I love sleeping, watching Hollywood blockbusters, my Wii, road trips and watching my 4 year old son grow up. In between I try to squeeze in some time to go to work.

Discussion

No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Traffic

Site Stats

  • 681,990 views since Feb 2012

Archives

Enter your email address to follow this blog and receive notifications of new posts by email.

Join 209 other followers

Flags

Free counters!
Follow

Get every new post delivered to your Inbox.

Join 209 other followers

%d bloggers like this: