How to implement custom CalcError

Posted by: jk on 27 August 2019, 3:03 am EST

  • Posted 27 August 2019, 3:03 am EST

    Hi,

    I am using custom functions, and now I'd like to define custom CalcError(s). Can you please suggest how to do that.

    Also, is there a way that a custom function returns more than one CalcError, basically passing a number of errors from other custom functions used as parameters.

    =CustFn(CustParamFn1(), CustParamFn2(), CustParamFn2())
    I'd like to be able to notify user that all three CustParamFn throw a CalcError.

    Can you suggest how to approach it, please?

    Thanks!!!
  • Replied 27 August 2019, 5:53 pm EST

    Hi,

    You may override the "acceptsError" method in your custom function. If the acceptsError method returns true then error will be passed to evaluate the method of your customFunction and you may return custom error messages as required.
    Please refer to the following sample which demonstrates the same:
    https://codesandbox.io/s/spread-js-starter-5jihy

    Regards
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels