Formula Editor entry for NPV has incorrect label

Posted by: greygranite on 8 September 2017, 1:54 pm EST

  • Posted 8 September 2017, 1:54 pm EST

    Hello,


    The Formula Editor dialog box lists the NPV arguments as "NPV(value1, value2, ...)".  This should be "NPV(rate, value1, value2, ...)" to match up the way the formula works.


    This is using the 12/22/2008 maintenance release:


    FarPoint.Win.Spread.dll                                                4.0.2009.2005

     


    Can you update this label?


     


    Thanks,


     


    Ed Ostrowski


     


     

  • Replied 8 September 2017, 1:54 pm EST

    Ed.

    Thank you very much for bringing this to our notice, I have tested the same and was able to replicate the issue. I have reported it as a bug # 25856, which should get fixed in the next maintenance release of the control.

    Thanks

  • Replied 8 September 2017, 1:54 pm EST

    Ed,

    I had a word with concerned team regarding the exhibited behavior from the SpreadDesigner and have been told that, it is the intended behavior as we have been practicing the same with other default function as well(who takes the similar parameters). So as of now this can not be processed as a bug with the control, however I am forwarding the same as future enhancement # 4406 in the next release of the control.

    Thanks

  • Replied 8 September 2017, 1:54 pm EST

    Thanks for the update Suresh.  But users of the our control have been confused by the inaccurate wording, so I am surprised that an invalid description of an argument list is not considered a bug.  What worries me is that since this is now considered an enhancement and not a bug, that it will not be included in the next release or may never be changed. 


    Our client has received a number of complaints on this so would like to know when the next release with this fix will be made available.


    Also, this concerns the run time spreadsheet when you invoke the formula wizard from the FormulaEditorUI dialog box


    Thank you,


    Ed Ostrowski 


     

  • Replied 8 September 2017, 1:54 pm EST

    Ed,


     The issue is that initially the FormulaEditor was not designed as a part of the public api but was merely an add-in used in the designer to assist in formula entry. Therefore it did not receive the same level of design consideration as the rest of the controls api. At some point, due to customer requests, we made the FormulaEditor publicly available but did not do anything more than just make it public. The current design does not allow for a simple bug fix but instead would require a more thorough review of the feature all together. Hence the enhancement request.


     In this case I would imagine that any change made would go into all existing versions that use this feature. I will take the time to review the feature as soon as possible and we can see about adding it a coming maintenance release.


     

  • Replied 8 September 2017, 1:54 pm EST

    Kevin,


    Ed's original issue (NPV formula parameters) is actually only one of a number of formula descriptions that we'd like to see corrected to match Excel. Our client has reported the following:


























    Per FarPoint


    Per Excel


    NPV(value1, value2,…)


    NPV(rate, value1, value2, …)


    FV(A,B,C,D,E)


    FV(rate, nper, pmt, pv, type)


    PV(A,B,C,D,E)


    PV(rate, nper, pmt, fv, type)


    PMT(A,B,C,D,E)


    PMT(rate, nper, pv, fv, type)


    NPER(A,B,C,D,E)


    NPER(rate, pmt, pv, fv, type)


    IRR(A,B)


    IRR(values, guess)


    Please add these to the enhancement request as well.


    Thanks,


    Arul Kaliappan

  • Replied 8 September 2017, 1:54 pm EST

    Ed and Arul,


    In Spread, functions are implemented via instances of the FunctionInfo class.  This class describes everything needed to parse and evaluate the function in a formula including the function name, the minimum number of arguments, the maximum number of arguments, and which arguments are optional.  This class does not provide argument names.  Thus, the spreadsheet's UI (designer and formula text box) simply generates generic argument names (e.g. "value1" for first argument, "value2" for second argument, "value3" for third argument) when displaying the function syntax.  These generic argument names are not wrong (hence the bug report closed as intended) but these generic argument names are less useful than the meaningful arguments names seen in Excel's UI (hence the enchancement request).


    To get the behavior you desire, the abstract FunctionInfo class would have to be enchanced so it could provide argument names.  Each of the 300+ implementations of the FunctionInfo class (one for each built-in function) would have to be upgraded to provide a meaningful name for each argument.  Spread's UI would then have to be modified to use this new feature of the FunctionInfo class.

  • Replied 8 September 2017, 1:54 pm EST

    Kevin/bobbyo,


    Is this enhancement going to be included in the next maintenance release? Do you have an expected date for the release?


     Thanks,


    Arul.

  • Replied 8 September 2017, 1:54 pm EST

    Arul,


    This has been added as an enhancement request, so it will not be addressed in a maintenance release but will be looked at for adding to the next version. Version 5 should be available later this year. If this is added, it will not be added until that point.

  • Replied 8 September 2017, 1:54 pm EST

    Scott,


    Did this enhancement request make it into version 5? I couldn't spot anything that pertains to it in the what's new documentation on the website.


     Thanks,


    Arul.

  • Replied 8 September 2017, 1:54 pm EST

    Arul,


    These function parameters have been updated in the Formula Editor dialog's definition for these functions in version 5 of Spread for Windows Forms.

Need extra support?

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

Learn More

Forum Channels