Bug 131362 - Miscellaneous issues with the Help files relating to Calc functions
Summary: Miscellaneous issues with the Help files relating to Calc functions
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.4.0.3 release
Hardware: All All
: medium normal
Assignee: Steve Fanning
URL:
Whiteboard: target:7.0.0
Keywords: needsDevAdvice
Depends on:
Blocks: HelpGaps-NewFeatures
  Show dependency treegraph
 
Reported: 2020-03-15 17:59 UTC by Steve Fanning
Modified: 2020-04-21 13:50 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Steve Fanning 2020-03-15 17:59:33 UTC
(1) In the syntax definition of financial functions DISC, DURATION and RECEIVED, it is not clear why quotation marks are included around the names of the first two parameters. In the syntax of most other functions, the date parameters do not follow this approach.

(2) The syntax definition for statistical function HYPGEOMDIST does not mention the optional Cumulative parameter, which is shown in the Function Wizard.

(3) In the syntax definition of date / time function DAYS360, it is not clear why quotation marks are included around the names of the first two parameters. In the syntax of most other functions, the date parameters do not follow this approach.

(4) In the syntax definition of logical function SWITCH, a default parameter is included. This is not evident in the Function Wizard.

(5) The syntax definition for database functions DCOUNT and DCOUNTA imply that the Database Field is optional, whereas the Function Wizard shows this field as required.

(6) The syntax definition for array function MMULT confusingly shows two parameters with the same name. In the Function Wizard these are differentiated as Array 1 and Array 2.
Comment 1 Steve Fanning 2020-04-03 10:56:50 UTC
Item (4) above is not a bug in the Help files. The syntax of the SWITCH function has been changed through bug 131360 and is now correct.
Comment 2 Steve Fanning 2020-04-04 14:39:39 UTC
With respect to item (5), I have done some experimentation with the DCOUNT and DCOUNTA functions. There is clearly a mismatch between the Help descriptions and the Function Wizard; the former indicates that the DatabaseField is optional while the latter indicates that is required.

My experimentation seems to indicate that the Help is correct and that you do not need to specify a value for the DatabaseField parameter for either of these two functions (e.g =DCOUNT(A1:E10, ,A13:E14 is fine)).

When we've completed the Help file corrections for this bug, I'll return it to unconfirmed and ask the developers to have a look at the Function Wizard implementation for these two functions.
Comment 3 Commit Notification 2020-04-06 13:57:44 UTC
Steve Fanning committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/help/commit/7c4871338464168d2016702e4f229d6a8ff2c2c5

tdf#131362 Adjust number of function param
Comment 4 Steve Fanning 2020-04-09 14:20:41 UTC
All Help file changes needed to address this bug have been checked today and are fixed in the latest LibreOffice Dev 7.0 Help build.
Comment 5 Steve Fanning 2020-04-09 14:24:27 UTC
I have returned this bug to UNCONFIRMED to request the developers to check the implementation of Calc's Function Wizard with regards to the DCOUNT and DCOUNTA functions.

My experimentation indicates that the DatabaseField parameter is optional in each case, whereas the labelling on the Function Wizard suggests that it is required.
Comment 6 Eike Rathke 2020-04-15 13:20:39 UTC
The DCOUNT() and DCOUNTA() second parameter is not strictly optional but the argument can be omitted / given empty, which then has the special meaning of counting all records that match Criteria (not only those with a value in the result DatabaseField). i.e. it is not possible to specify just one parameter or only two, all three have to be present, hence the parameter is not marked optional in the Function Wizard.
Comment 7 Steve Fanning 2020-04-21 13:50:14 UTC
I have added an example to the Syntax section of the Help topics for these two functions, clarifying how to "omit" the parameter. See https://gerrit.libreoffice.org/c/help/+/92443.

This update has been checked in the LibreOffice Dev 7.0 Help build.

Chaged status to Resolved / Fixed.