How to query a collection

223 views
Skip to first unread message

J.M.

unread,
Oct 13, 2016, 6:57:11 AM10/13/16
to Fujitsu RunMyProcess Developer Community
Hi,


I need help querying a collection.
I have a collection with a field which contains dates like "12/12/2016" and I need to get the most recent date in freemarker.

My skills with Mongo are not the best, so How would the query be?


Thanks and regards.

Murali

unread,
Oct 13, 2016, 8:40:56 AM10/13/16
to Fujitsu RunMyProcess Developer Community, javiermm...@gmail.com
Hi Javier,

Please configure the date column Type as "Text" in your report widget configuration and update the "Query" as below.

{"$query":{},"$orderby":{"date_col":-1}}

Userguide ref : https://docs.runmyprocess.com/Developer_Guide/Collection/Collection_JS_Freemarker#sort-items-in-a-report

Regards,
Murali
Fujitsu RunMyProcess Support
Reply all
Reply to author
Forward
0 new messages