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. Image for the cookie policy date

ClcQuick Keys or variables

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?



3 Replies

NR Nirmal Raja Syncfusion Team 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



TL Tom Loder 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



AA Arulraj A Syncfusion Team 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



Loader.
Live Chat Icon For mobile
Up arrow icon