Post

2 followers Follow
0
Avatar

Custom page and javascript query

I'm creating a custom page under Organization and I need help.
I want to show the number of project "On Track", "Off Track", "At Risk" for a Region, these values are included in the field C_OverallProjectHealth
I'm using this function to retrieve them (filtering the region and the status):
performQuery("select count() as cnt, C_OverallProjectHealth from project
where C_Geo in('Japan') and (C_FCStatus = 'Signed/Executing' or C_FCStatus = 'On Hold')
group by C_OverallProjectHealth order by C_OverallProjectHealth" );
The function works and return the right counts.
But if I add another filter (the "C_GrowthvsFoundation" picklist that contains only two values) the function stop to work:
performQuery("select count() as cnt, C_OverallProjectHealth from project
where C_Geo in('Japan') and (C_FCStatus = 'Signed/Executing' or C_FCStatus = 'On Hold') and C_GrowthvsFoundation='Growth'
group by C_OverallProjectHealth order by C_OverallProjectHealth" );

The strange thing is that if I replace the 'Japan' value with the complete list of possible values on Geo ('Japan', 'Americas', ...) it works.
So it doesn't work if I select just one Geo and add the filter on the C_GrowthvsFoundation.
I have no idea where the issue comes from...
Any suggestion?

Thanks

Cristina Floris Answered

Official comment

Avatar

Hi Cristina,

This was resolved as a support ticket.

Roland

Roland Pumputis
Comment actions Permalink

Please sign in to leave a comment.

1 comment