Home » Developer & Programmer » Forms » hoew to control one item from another one
hoew to control one item from another one [message #308760] Tue, 25 March 2008 06:42 Go to next message
Messages: 12
Registered: March 2008
Junior Member
i have made a table called "reg".. in that form there are two columns ..one is emergency and another is rate..
i just want that when i select emergency to yes then automatically rate feild should show "300".. and when i select no to emergency then rate should be "0"..

brother i have another problem..!! can u solve it?
How to make a field activated based on the value of the other field?
e.g. I have 1 field call 'charge'(to be activated) and another field "emergency" which has 2 values viz 'yes' and 'no'. If 'yes' is been selected the charge field should display a fix amount e.g 500 otherwise when "no" is selected ,field should be deactivated and should display 0.
so can u help me out? Plz..

[EDITED by LF: added the second part of the question as a copy from another thread. Please, do not span your questions all over the forum]

[Updated on: Fri, 28 March 2008 00:46] by Moderator

Report message to a moderator

Re: hoew to control one item from another one [message #308775 is a reply to message #308760] Tue, 25 March 2008 07:09 Go to previous messageGo to next message
Messages: 21128
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Use DECODE; here's an SQL*Plus example:
SQL> select decode('&emergency', 'y', 300, 'n', 0) rate from dual;
Enter value for emergency: y


SQL> /
Enter value for emergency: n


Hint: Forms trigger will look like
select decode(:block.emergency, 'y', 300, 'n', 0) from dual;
Which trigger? Could be more than one choice. POST-QUERY, WHEN-VALIDATE-ITEM, ... You choose.

By the way, which value do you want to have when user enters something different from Y and N?
Re: how to put background image in form [message #309576 is a reply to message #308760] Thu, 27 March 2008 23:40 Go to previous message
Messages: 551
Registered: August 2005
Senior Member
ok you can do this on the EMERGENCY list item on WHEN LIST CHANGED if yes then set the properties ENABLED, NO UPDATE ALLOWED to TRUE of the CHARGES item else if EMERGENCY list item is NO then set the properties of CHARGES item to DISABLED.

Azam Khan
Previous Topic: How to check for duplicate values in form.
Next Topic: Get filenames of a specific directory
Goto Forum:

Current Time: Mon Jul 24 06:08:29 CDT 2017

Total time taken to generate the page: 0.10754 seconds