Agg Model failing w/ "Field must be grouped or aggregated: Name" message

  • 1
  • Problem
  • Updated 3 years ago
  • Solved


And the query generated using Service__c for grouping that works fine.

SELECT SUM(Starting_Hours__c) sumStartingHoursc,Service__c servicec,Service__r.Name servicerName FROM Task__c WHERE (Work__r.Sprint__c = 'a3oj0000000Xb5nAAC')  GROUP BY Service__c,Service__r.Name

Using Work__c instead of Service__c for grouping should work just fine as well, but sadly no. :(
Photo of Pat Vachon

Pat Vachon, Champion

  • 44,426 Points 20k badge 2x thumb

Posted 3 years ago

  • 1
Photo of Zach McElrath

Zach McElrath, Employee

  • 53,784 Points 50k badge 2x thumb
Pat, can you post the SOQL query generated when you're using Work__c instead of Service__c? And also can you post the XML for the Model when it displays this error?
Photo of Zach McElrath

Zach McElrath, Employee

  • 53,784 Points 50k badge 2x thumb
Not yet - I tried to replicate an identical setup and didn't get the same error. What version of Skuid are you on where this is happening? 
Photo of Pat Vachon

Pat Vachon, Champion

  • 44,426 Points 20k badge 2x thumb
8.10
Photo of Pat Vachon

Pat Vachon, Champion

  • 44,426 Points 20k badge 2x thumb
Found the issue. The Name is Autonumber, which isn't groupable. :(
Photo of Oliver Sinfield

Oliver Sinfield

  • 922 Points 500 badge 2x thumb
Yeah, this is rather annoying... we have to create workflow rules to copy the  auto number/name to a text field for use in aggregate groupings.
Photo of Zach McElrath

Zach McElrath, Employee

  • 53,784 Points 50k badge 2x thumb
Glad to at least know what the issue is...