Discussion:
oracle forms doubt - text box
(too old to reply)
Eduardo
2004-11-22 09:10:02 UTC
Permalink
Hello,

How do I get a value that the user typed in a text box, before it is
inserted in te database?

I'm using the Oracle forms (f60desm) to develop a graphical interface
for my turism agency database. There are 3 text box relevants:
- # of people that will travel
- price pour each person
- the total price.
After the user entered the first 2 values, I would like to add a
boutton to calculate and fill the total price, using the 2 first
values, before everything is commited. But I can't find how to read
values that are not on the db on my procedure.

Thanks

Eduardo
Mark C. Stock
2004-11-22 11:35:15 UTC
Permalink
"Eduardo" <***@gmail.com> wrote in message news:***@posting.google.com...
| Hello,
|
| How do I get a value that the user typed in a text box, before it is
| inserted in te database?
|
| I'm using the Oracle forms (f60desm) to develop a graphical interface
| for my turism agency database. There are 3 text box relevants:
| - # of people that will travel
| - price pour each person
| - the total price.
| After the user entered the first 2 values, I would like to add a
| boutton to calculate and fill the total price, using the 2 first
| values, before everything is commited. But I can't find how to read
| values that are not on the db on my procedure.
|
| Thanks
|
| Eduardo

:blockname.fieldname

plenty of examples in the on-line docs and help

also look into calculated fields and WHEN-VALIDATE-ITEM triggers

++mcs
DA Morgan
2004-11-23 02:57:57 UTC
Permalink
Post by Eduardo
Hello,
How do I get a value that the user typed in a text box, before it is
inserted in te database?
I'm using the Oracle forms (f60desm) to develop a graphical interface
- # of people that will travel
- price pour each person
- the total price.
After the user entered the first 2 values, I would like to add a
boutton to calculate and fill the total price, using the 2 first
values, before everything is commited. But I can't find how to read
values that are not on the db on my procedure.
Thanks
Eduardo
One way is the WHEN-VALIDATE-ITEM trigger. Code like this will work:

BEGIN
IF :ATS_BL.INVAL IS NOT NULL
AND :ATS_BL.INVAL > 0 THEN
:ATS_BL.OUTVAL := NULL;
:ATS_BL.NETVAL := :ATS_BL.INVAL * 1;
END IF;
END;
--
Daniel A. Morgan
University of Washington
***@x.washington.edu
(replace 'x' with 'u' to respond)
Loading...