473,396 Members | 2,010 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Eval formula on the fly

Hi,

How to eval a formula on the fly ?
I have a table where I store some formula like "(5+9)/2"
Each number reffers to a row so that gives
(row(5)+row(9))/row(2)

I think if someone could tell me how to perform this operation
(5+9)/2 on the fly to get 7, I ll be able to do this one
(row(5)+row(9))/row(2)

Any help

Stan
Nov 18 '05 #1
3 1699
Hi Stan,

You want to eval the formula on the fly where ?
in Javascript or code behind file or in some control ( say datagrid ?)

if you can tell me it would be easy to solve your issue.

Thanks
Raghavendra
"Stan Sainte-Rose" <st**@cyber972.com> wrote in message
news:Ol**************@TK2MSFTNGP12.phx.gbl...
Hi,

How to eval a formula on the fly ?
I have a table where I store some formula like "(5+9)/2"
Each number reffers to a row so that gives
(row(5)+row(9))/row(2)

I think if someone could tell me how to perform this operation
(5+9)/2 on the fly to get 7, I ll be able to do this one
(row(5)+row(9))/row(2)

Any help

Stan

Nov 18 '05 #2
Hi Raghavendra,

I think I ve found my solution..
http://groups.google.de/groups?selm=...tngp13.phx.gbl

Thanks
Stan

"Raghavendra T V" <ra*****@hotmail.com> a écrit dans le message de news:
eI*************@TK2MSFTNGP09.phx.gbl...
Hi Stan,

You want to eval the formula on the fly where ?
in Javascript or code behind file or in some control ( say datagrid ?)

if you can tell me it would be easy to solve your issue.

Thanks
Raghavendra
"Stan Sainte-Rose" <st**@cyber972.com> wrote in message
news:Ol**************@TK2MSFTNGP12.phx.gbl...
Hi,

How to eval a formula on the fly ?
I have a table where I store some formula like "(5+9)/2"
Each number reffers to a row so that gives
(row(5)+row(9))/row(2)

I think if someone could tell me how to perform this operation
(5+9)/2 on the fly to get 7, I ll be able to do this one
(row(5)+row(9))/row(2)

Any help

Stan


Nov 18 '05 #3
Here is one technique:
http://odetocode.com/Articles/80.aspx

--
Scott
http://www.OdeToCode.com

On Wed, 1 Sep 2004 10:11:16 +0200, "Stan Sainte-Rose"
<st**@cyber972.com> wrote:
Hi,

How to eval a formula on the fly ?
I have a table where I store some formula like "(5+9)/2"
Each number reffers to a row so that gives
(row(5)+row(9))/row(2)

I think if someone could tell me how to perform this operation
(5+9)/2 on the fly to get 7, I ll be able to do this one
(row(5)+row(9))/row(2)

Any help

Stan


Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Erwin Moller | last post by:
Hi all, Situation: I need arbitrary calculations to be done on certain columns in a table. The formula's are dynamical. I will replace certain values in the formulastring with their current...
11
by: sneill | last post by:
I have read a number of posts on the use of eval() in Javascript, and I agree that its use is questionable. But it does beg the following question: "How arbitrary does a string need to be before...
8
by: Bri | last post by:
Greetings, I am using Eval() in a query with only limited success. If the text within the function contains a reference to a Field I get #ERROR#. I'll try and explain what I'm trying to do and...
0
by: RJN | last post by:
Hi I have a main report and a sub report. I have a formula field on the main report and one on the sub report. I want the formula in the subreport to be evaluated after the formula in the main...
0
by: RJN | last post by:
Hi Sorry for posting this message again. I have a main report and a sub report. I have a formula field on the main report and one on the sub report. I want the formula in the subreport to be...
8
by: werner | last post by:
Hi! I don't want to use eval() in order to parse a user-supplied formula. What alternatives do I have? PHP has no standard functionality for tokenizing or parsing expressions in this regard. ...
8
by: abhishek | last post by:
>>a,b=3,4 7 Now I want to evaluate y by substituting for the evaluated value of x. eval(y) will try to add "a+b" to 3 and return an error. I could do this, 10 but this becomes unwieldy if I...
1
by: Ivan Sammut | last post by:
Hi ppl I have an edit box where the user can enter a formula like "12+5" or some other simple formula. Is there any function in c# which owuld evalute a string and give me the result of the...
1
by: Larry Bud | last post by:
Is this possible: I have a drop down with a variety of exchange rates (1, .85, .094783, etc) I have a formview which retrieves a row of data with dollar figures. Can I change the databinding...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.