Home » Developer & Programmer » Forms » Calculating Values in a Text -Item
Calculating Values in a Text -Item [message #81130] Tue, 14 January 2003 05:05 Go to next message
Jameel Ahmed
Messages: 10
Registered: January 2003
Junior Member
I have a Text-Item where user can inputs his values and mathematical operators. how can i get the result.

for example
user input: 258/6*2
it must result me 86
how can i get this calculation while all the values and operators are in a same text-item
Re: Calculating Values in a Text -Item [message #81142 is a reply to message #81130] Wed, 15 January 2003 19:13 Go to previous messageGo to next message
Evan Briggs
Messages: 12
Registered: November 2002
Junior Member
You'll probably have to write your own procedure to do this. You can search the text-item using the INSTR function and you can extract the numbers using the SUBSTR and TO_NUMBER functions.

Good Luck!
Re: Calculating Values in a Text -Item [message #81144 is a reply to message #81142] Wed, 15 January 2003 23:08 Go to previous message
manish mendiratta
Messages: 110
Registered: May 2002
Senior Member
Use d2k_conv package which contains function to expr_to_number which perform calculations for you and check the expression also..like
20*12/(12*11)
it will tell you if one bracket is missing or something.
This will help.

Manish Mendiratta
Previous Topic: urgently help required please
Next Topic: Calling backend procedures from forms
Goto Forum:
  


Current Time: Tue May 21 19:44:30 CDT 2024