Home » Applications » Oracle Fusion Apps & E-Business Suite » How to make one field dependent on another (EBS version 12.1.3 DB version 11.2.0.2 and Forms10g)
How to make one field dependent on another [message #554002] Wed, 09 May 2012 12:19 Go to next message
knsreedevi
Messages: 25
Registered: May 2012
Location: Bangalore
Junior Member
Hi All,

I have 2 fields say FieldA and FieldB which is dependent on FieldA.
The logic is If FieldA is NULL then FieldB should be NULL
If FieldA is not NULL then FieldB should be not NULL.
I have written the following code in the WHEN-VALIDATE-ITEM trigger of FieldA
if :BLOCK_NAME.FieldA is not null then
set_item_property('BLOCK_NAME.FieldB', REQUIRED, PROPERTY_TRUE);
end if;
This makes the FieldB mandatory (color changes to yellow) when I tab out of FieldA, but if I save the record without any value for FieldB, it gets saved without any errors.
Any help is appreciated.

Re: How to make one field dependent on another [message #554003 is a reply to message #554002] Wed, 09 May 2012 12:49 Go to previous messageGo to next message
Dave199
Messages: 2
Registered: May 2012
Location: US
Junior Member

Try the following:

I have tried something like this on "ON-VALIDATE-FIELD" trigger and it worked in R12/Forms 10g.
Which version are you working on?

set_item_property('BLOCK_NAME.FieldB', REQUIRED, PROPERTY_TRUE);
fnd_message.set_string('Please Enter value for FieldB.');
fnd_message.show;
Bell;
raise form_trigger_failure;
Re: How to make one field dependent on another [message #554132 is a reply to message #554003] Thu, 10 May 2012 11:27 Go to previous message
knsreedevi
Messages: 25
Registered: May 2012
Location: Bangalore
Junior Member
Used the same code in when-validate-item and its working.
Thnks
Previous Topic: How to restrict users from pressing F11 and CTRL-F11 on a form
Next Topic: lockbox
Goto Forum:
  


Current Time: Mon Dec 23 04:43:35 CST 2024