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.
Unfortunately, activation email could not send to your email. Please try again.

what javascript is for Essential Calculate's CalcQuick?

Thread ID:

Created:

Updated:

Platform:

Replies:

132277 Aug 23,2017 11:04 AM Aug 26,2017 01:57 AM Windows Forms 3
loading
Tags: General
hui zheng
Asked On August 24, 2017 04:36 AM

Hi,
We use Essential Calculate to parse and calculate some formulas. We actually just use CalcQuick or Indexer method for calculation. Your this link https://help.syncfusion.com/js/calculate/getting-started says ej.web.all.min.js needs to be added. But this file is too big and seems including everything (most of which we don't need). So to use CalcQuick, what specific javascript file shall we add in our project?

Another  question regarding the use of calcQuick. when something goes wrong with the formula, where shall we fetch the error message? In our test, it seems when formula parsing fails, getKeyValue() for a formula calculation returns nothing, and in some cases, it returns something like #name. So if calculation returns nothing or returns something, how shall we know if it is calculation result or it is error message? Can you provide error handling examples when calcQuick is used?

Thanks!
Hui  

 

Mohanraj Gunasekaran [Syncfusion]
Replied On August 24, 2017 09:17 AM

Hi Hui, 

Thanks for using Syncfusion product. 

Query 
Solution 
To use CalcQuick, what specific javascript file shall we add in our project? 
In order to use the calculate formulas alone, you can use the ej.Calculate.js script file which can be download from CSG. 
 
Please refer the following UG link to create CSG, 
Another  question regarding the use of calcQuick. when something goes wrong with the formula, where shall we fetch the error message?  
We can understand your scenario. By default, we have handled the error in our source and return the value like (#Name, #Value, (etc)). So, there is no support to get the errors in formula calculation. 

If you did not get any error message. Please share that formula with value to reproduce the scenario. It will be helpful to provide the solution at the earliest. 
 

Regards, 
Mohanraj G 
 


hui zheng
Replied On August 24, 2017 09:52 AM

Hi Mohanraj,

Thank you for the solutions. They are working. 

Regarding error message, if there is a typo in formula, i got undefined value ánd there is no error message. One example, SQRT([A] * [A] +ads [B]).  However this is not big problem for us. If getKeyValue() returns undefined value, we suppose there is an error in formula.


Thanks

Hui




Piruthiviraj Malaimelraj [Syncfusion]
Replied On August 26, 2017 01:57 AM

Hi Hui, 

Thanks for your update, 

We could able to understand your scenario and the given formula is seeming like that you have used custom function in SQRT formula. So, can you please confirm us whether you have used any custom function is formula? Here we have attached the simple sample with CalcQuick customization. If possible, modify the attached sample with your formula (custom function) customization. It would be more helpful for us to analyze this reported scenario at our end provide the better solution at the earliest, 

Sample link: 

Thanks for your understandings, 

Regards, 
Piruthiviraj 


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.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;