Solved

Group by error on custom field on Project History Info -> Revenue

  • 1 November 2022
  • 4 replies
  • 83 views

Userlevel 2
Badge +7

Hi

We get the following error on the Project History Info → Summary → Revenue after we added custom fields. 
 


In this screenshot RR Actual is a custom field, just a simple persistent number field. The field itself has no select so it cant be failing

Is this an error or is it simply not intended for new fields to be added here?

Best Regards

icon

Best answer by Charana Udugama 1 November 2022, 15:44

View original

4 replies

Userlevel 7
Badge +10

Hi @NicklasMadsen,

This error occurs when the GROUP BY clause does not contain all the expressions in the SELECT clause. Any SELECT expression that is not included in the GROUP function must be listed in the GROUP BY clause.

As you’ve mentioned “In this screenshot RR Actual is a custom field, just a simple persistent number field. The field itself has no select so it cant be failing”, the RR Actual doesn’t have a select here. 

To correct this error, include all of the SELECT expressions in the GROUP BY clause. Make sure the expressions are not group function arguments. There are namely three methods for resolving this error.

  • Rewrite the SELECT statement so that the expression or column listed in the SELECT list is also in the GROUP BY clause.
  • You may choose to remove the GROUP BY function from the SELECT statement altogether.
  • Remove any expressions that do not belong in the GROUP BY clause from the SELECT list

I hope this helps. 

Best Regards,
Charana

Userlevel 2
Badge +7

@Charana Udugama 
What Select expression?
What Group by function?

There are no select expressions or group by that i know of. The page is IFS standard with 1 custom field which does not have a select. There are also no searches. So i do not understand what you mean. Where exactly would i rewrite this SELECT?

Best Regards

Userlevel 7
Badge +10

Hi @NicklasMadsen ,

My apologies for not being clear. The windows (eg: Project History Info, Customer Order..etc) and their Tabs (Cost, Revenue, Hours) are built using views. Views are basically select queries. This Revenue tab is built using the view ‘PROJ_CONN_REVENUE_HISTORY_SUM’. Here is the code of that view.

As you can see, it’s a select query and there is the GROUP BY function. When you create the field ‘RR Actual’, it might have gotten itself into GROUP BY section and for it to work, it should be in the SELECT section as well.

To overcome this, the view should be adjusted to your requirement. For that you need to reach to your relevant party. If you are not aware who that is, please raise a support ticket to get assistance. 

 

Best Regards,
Charana

Userlevel 2
Badge +7

I suppose i will have to raise a support ticket.

Thank you for your time

Reply