Dynamically Calculated Column doesn't support aggregate expr

If you think that something doesn't work in Aware IM post your message here
Post Reply
JonP
Posts: 287
Joined: Thu Feb 16, 2017 9:49 pm
Location: United States

Dynamically Calculated Column doesn't support aggregate expr

Post by JonP »

I tried to count the number of relationships for a peer multiple attribute, which resulted in an error, "Invalid calculation: Syntax error at token '.' (column 2)." The error results from only the expression. Leaving the expression off technically works, but the column cell is empty rather than showing 'No' when there are no relationships, so I need COUNT() to get the 0 that will give me a 'No'. Changing the type has no effect either. The problem is the aggregate expression.
Attachments
DynamicallyCalculatedColumn.png
DynamicallyCalculatedColumn.png (41.64 KiB) Viewed 5975 times
v8.1 on Windows 10 / MySQL 5.6 (local), v8.1 on Windows Server 2016 / MySQL 5.6 (server)
aware_support
Posts: 7525
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Re: Dynamically Calculated Column doesn't support aggregate

Post by aware_support »

If pm_EnterpriseConsiderationSurveys is a multiple reference, then you cannot use it in COUNT like this.

The correct syntax is something along the lines of:

COUNT EnterpriseConsiderationSurvey WHERE (EnterpriseConsiderationSurvey IN Person.pm...)
Aware IM Support Team
JonP
Posts: 287
Joined: Thu Feb 16, 2017 9:49 pm
Location: United States

Re: Dynamically Calculated Column doesn't support aggregate

Post by JonP »

I tried as you suggested, but I got another error: "Aggregate functions in calculation may not have WHERE keyword".
Attachments
Dynamically Calculated Column.png
Dynamically Calculated Column.png (23.87 KiB) Viewed 5955 times
v8.1 on Windows 10 / MySQL 5.6 (local), v8.1 on Windows Server 2016 / MySQL 5.6 (server)
Post Reply