Home » Applications » Oracle Fusion Apps & E-Business Suite » Setting Default Values in CUSTOM.pll (For Apps Forms)
Setting Default Values in CUSTOM.pll (For Apps Forms) [message #110096] Thu, 03 March 2005 08:36 Go to next message
a.prashanth
Messages: 3
Registered: March 2005
Location: India
Junior Member
I have a FOrm which has a flag (List Item), for which initial value is set to 'Y'. I want to set it to 'N', by default.

In CUSTOM.pll , i tried this.

copy(v_ok_to_pay_flag,'BAT_MDFY_PMT.OK_TO_PAY_FLAG');

where v_ok_to_pay_flag is set to 'N'.

Now, when i open the form the value is set to 'N' (as i wanted it to be).But when i am moving to next record, this is being treated as a change in the form and its prompting whether to Save the Changes or Not.

I have also tried this.

Default_Value('N','BAT_MDFY_PMT.OK_TO_PAY_FLAG');

This doesnt workout ,but!

Hw do i default it to 'N' ?

Thanks in advance

Prashanth
Re: Setting Default Values in CUSTOM.pll (For Apps Forms) [message #110553 is a reply to message #110096] Tue, 08 March 2005 11:23 Go to previous message
adragnes
Messages: 241
Registered: February 2005
Location: Oslo, Norway
Senior Member
The reason you get the prompt is that what you did is the equivalent of the user entering 'N' in the specified field. The form detects that something has been changed and prompts you to save when you move away from the record.

The trick to get around this is to not enter the default values before the users have entered something themselves. If you have some required field without any default value early in the form, you could on WHEN-NEW-ITEM-INSTANCE check whether this contained a value and if so default the value for the flag.

You would of course also need to check that the value of the flag has not been set before, that you are not in query-mode and that it is a new record and not one that has been previously saved.

--
Aleksander Dragnes
Previous Topic: custom.pll
Next Topic: Install problem on Linux RHEL 3.0
Goto Forum:
  


Current Time: Tue Apr 30 20:27:47 CDT 2024