We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.

# ClcQuick Keys or variables

#### Replies:

98500 Mar 4,2011 12:18 PM UTC Jun 6,2011 03:55 AM UTC ASP.NET Web Forms (Classic) 3
 Subscribe to this post Tags: Calculate
Tom Loder
Asked On March 4, 2011 12:18 PM UTC

Is there a way to get a list of required keys or variables for a formula in CalcQuick. When you call the ParseAndCompute, it will only cause an error about the first key.

e.g.
Dim clc As New CalcQuick(True)
clc("KeyOne") = 1
clc("KeyTwo") = 2
clc("KeyThree") = 3
Result = clc.ParseAndCompute("Key1 + Key2 + Key3")

will return the error "Unknown Key: KeyOne".

But I would like to get either a list off all the variables in the formula so i can check them, or an error for each missing key?

Nirmal Raja [Syncfusion]
Replied On March 10, 2011 07:33 AM UTC

Hi Tom,

Thank you for your interest in Syncfusion products.

The named values specified through the calculate engine has to be retrieved in the formula through the square braces. Also the name does not seems to be the name provided in the formula.

Please refer the code below:
`Result = clc.ParseAndCompute("[Key1] + [Key2] + [Key3]")`

Let me know if you have any concern.

Regards,
Nirmal

Tom Loder
Replied On May 31, 2011 04:05 PM UTC

Just to clarify I want it to identify all the missing keys in the formula not just the first one:

Dim clc As New CalcQuick(True)
clc("KeyApple") = 1
clc("KeyBanana") = 2
clc("KeyCarrot") = 3
Result = clc.ParseAndCompute("[KeyZam] + [KeyYogurt] + [KeyXray]")

Would generate an error of "Missing KEYS KeyZam, KeyYogurt and KeyXRay"

Also is there a way of clearing out any keys in a calcquick object

Arulraj A [Syncfusion]
Replied On June 6, 2011 03:55 AM UTC

Hi Tom,

Thank you for your interest in Syncfusion products.

Please follow-up the incident 80981 regarding this query.

Please let us know if you have any further concerns.

Regards,
Arulraj.A

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.