Page 1 of 1

Order By clause on Chart

Posted: Thu Jan 30, 2020 5:12 pm
by Wendy
I have a database driven chart that is counting the occurrences of problems for a machine ID. I only want the top 10 machines with highest incident number. I could use, and have used, a custom SQL so the Order By property is utilized. However, why won't the order by property, which is available on a database driven chart, override the default order by for that chart?

Widget Type = chart
database file = MNCSTWRK
name field=MNREF
value field=MNWO
summary option = count
record limit = 10
order by = count(MNWO) desc

If the 'order by' property is not going to be used, it shouldn't be available.

The sql in the PUISSNVP file looks like this: SELECT MNREF, count(MNWO) FROM MNCSTWRK GROUP BY MNREF ORDER BY MNREF

Thank you!
Wendy

Re: Order By clause on Chart

Posted: Thu Jan 30, 2020 5:32 pm
by Scott Klement
If you suspect that there's a bug in Profound UI, then please report it as a bug to Profound Logic. You can do that by e-mailing support@profoundlogic.com

Re: Order By clause on Chart

Posted: Fri Jan 31, 2020 8:58 am
by Wendy
I actually didn't really think about it being a bug. I just thought it wasn't intended to work. But thank you so much, I will report it.

Wendy

Re: Order By clause on Chart

Posted: Fri Feb 07, 2020 3:43 pm
by Wendy
Just to follow up for people reviewing this post.....

Profound support said this:
Thank you for your patience with this support ticket. Looking into this further, it seems that the behavior that you are experiencing with your chart is expected. When using the 'summary option' property with your database-driven grid, the 'order by' property will be ignored. In this case, the grid will automatically sort on the 'name field' property. So, if you want to use the 'order by' property for your database-driven chart, you will need to remove the 'summary option' property, first.

I then asked for a request for enhancement so that the summary options would work in the order by clause.

Regards,
Wendy