Page 1 of 1

Input Numeric Field in Comments - does not average although it is set

Posted: 19 Dec 2022, 00:00
by rennecke
Hello.
I have set a field type "Input Numeric Field in Comments" and set "Calculate average value".
My understanding is, that all values in the comments will be averaged.
FieldConfig.png
This is not working. It is summarizing the comments values.
Screen.png
Did I set up something wrong?

Re: Input Numeric Field in Comments - does not average although it is set

Posted: 19 Dec 2022, 08:06
by support
"Calculate average value" - this option is just for records listing. Just create new Formula fields for calculation in item page.

Re: Input Numeric Field in Comments - does not average although it is set

Posted: 19 Dec 2022, 11:48
by rennecke
Hello.
Many thanks for the feedback.
Do you have a hint, how to count the number of comments for a record?
Regards Eberhard

Re: Input Numeric Field in Comments - does not average although it is set

Posted: 19 Dec 2022, 12:20
by support
Comments stored in app_comments table. You can use Mysql query field type (for formula) to create sql to count comments for the record.

Re: Input Numeric Field in Comments - does not average although it is set

Posted: 19 Dec 2022, 13:26
by rennecke
OK, got it. Thanks.
I use

Code: Select all

SELECT COUNT(id) FROM app_comments WHERE app_comments.entities_id = 25 AND app_comments.items_id = [id]