Home » Developer & Programmer » Forms » Getting calculation result from 2 form text boxes (Dev6i)
icon5.gif  Getting calculation result from 2 form text boxes [message #498064] Tue, 08 March 2011 09:27 Go to next message
ArkeologeN
Messages: 37
Registered: March 2011
Location: Karachi, Pakistan
Member
hye! i'm new in Oracle Professional Development.. I'm creating an on demand software. I have 3 text boxes on my form
1st text box will carry Product's Actual Price
2nd text Box will carry Product's Selling Price
3rd text Box will carry Profit..

3rd one is display item..this will carry "selling price - actual price" and then result into 3rd box.. that would be profit..

my query is
select nvl(:PL_PRODUCT_SELL_PRICE, 0) - nvl(:PL_PRODUCT_ACT_PRICE, 0) INTO :PL_PRODUCT_PROFIT FROM SBM_PRODUCT_LIST;

Now, please help me how can I move Proceed? I've currently applied this trigger as POST-query on form and POST-CHANGE on :PL_PRODUCT_PROFIT

PLease help me as soon as possible. I've to proceed..
I'll be very thankful to you professionals.
Re: Getting calculation result from 2 form text boxes [message #498067 is a reply to message #498064] Tue, 08 March 2011 09:36 Go to previous messageGo to next message
cookiemonster
Messages: 13938
Registered: September 2008
Location: Rainy Manchester
Senior Member
1) Can you please read and follow the orafaq forum guide - especially the part on how to format your post.
2) Since you don't need to query the DB to get this information you shouldn't be using a select statement. Instead you should be using a direct assignment:
:PL_PRODUCT_PROFIT := nvl(:PL_PRODUCT_SELL_PRICE, 0) - nvl(:PL_PRODUCT_ACT_PRICE, 0);

3) You should get into the habit of always prefixing item names with the corresponding datablock.
4) You should use when-validate-item instead of post-change.
Re: Getting calculation result from 2 form text boxes [message #498069 is a reply to message #498067] Tue, 08 March 2011 09:48 Go to previous messageGo to next message
ArkeologeN
Messages: 37
Registered: March 2011
Location: Karachi, Pakistan
Member
Thanks alot Sir. And sorry sir.. I didn't read the orafaq rules. Sorry for it. I must read them right Now.. Sorry and Thanks again sir. let me check this ..
Re: Getting calculation result from 2 form text boxes [message #498070 is a reply to message #498069] Tue, 08 March 2011 09:52 Go to previous message
ArkeologeN
Messages: 37
Registered: March 2011
Location: Karachi, Pakistan
Member
Thanks alot Sir. Really really thanks. This is working.
Previous Topic: Can not display NEW .gif files as icon on buttons
Next Topic: not saving
Goto Forum:
  


Current Time: Tue Sep 17 05:03:54 CDT 2024