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

Post Reply
User avatar
rennecke
Sponsor
Sponsor
Posts: 214
Joined: 14 Jan 2018, 12:55
Name: Eberhard Rennecke
Location: Switzerland Zurich

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

Post 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?
User avatar
support
Site Admin
Posts: 6215
Joined: 19 Oct 2014, 18:22
Name: Sergey Kharchishin
Location: Russia, Evpatoriya

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

Post by support »

"Calculate average value" - this option is just for records listing. Just create new Formula fields for calculation in item page.
User avatar
rennecke
Sponsor
Sponsor
Posts: 214
Joined: 14 Jan 2018, 12:55
Name: Eberhard Rennecke
Location: Switzerland Zurich

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

Post 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
User avatar
support
Site Admin
Posts: 6215
Joined: 19 Oct 2014, 18:22
Name: Sergey Kharchishin
Location: Russia, Evpatoriya

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

Post 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.
User avatar
rennecke
Sponsor
Sponsor
Posts: 214
Joined: 14 Jan 2018, 12:55
Name: Eberhard Rennecke
Location: Switzerland Zurich

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

Post 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]
Post Reply