Quering my collection by dates

122 views
Skip to first unread message

J.M.

unread,
Nov 10, 2016, 4:00:22 AM11/10/16
to Fujitsu RunMyProcess Developer Community
Hi,

I need help with a query.
I have a collection that contains some events with a field date in this form:
{
...
"date" : "18/11/2016",
...
}

I'm showing this field in a widget report, but I need to query the events that happened between two dates. How can I get that? I'm getting crazy with that...

Thaks in advance and regards.

Murali

unread,
Nov 10, 2016, 7:09:43 AM11/10/16
to Fujitsu RunMyProcess Developer Community, javiermm...@gmail.com
Hi Javier,

Please find the related solution references in our resolved post.

Hope this helps.

Regards,
Murali
Fujitsu RunMyProcess Support


J.M.

unread,
Nov 10, 2016, 7:26:58 AM11/10/16
to Fujitsu RunMyProcess Developer Community, javiermm...@gmail.com
Hi Murali,

I don't find the link specially usefull. The date format is different, and It seems that there is not a final solution.

Could you give me some more help, please?


Thaks again and regards.

javiermm...@gmail.com

unread,
Nov 10, 2016, 7:34:18 AM11/10/16
to Fujitsu RunMyProcess Developer Community, javiermm...@gmail.com
I've tried too, using date format in my array widget, but I don't know the format of the date that this report is waiting.
I've tried in ms, but it does not work correctly.
If my collection has
{
...
"fecha" : 1477432800000,
...
}

the date shown seems like the image attached.

Tha date filter of the widget array provide exactly the functionality I want, that is , the between filter. So
How is the format that I should to use in the widget?


Thanks again and regards.
date column.png

Murali

unread,
Nov 11, 2016, 6:04:58 AM11/11/16
to Fujitsu RunMyProcess Developer Community, javiermm...@gmail.com
Hi Javier,

Please save/convert the date into string format in collection and then include/execute below JS code template to apply the filter.

Userguide Ref :http://docs.runmyprocess.com/API_Reference/JS/RMP_Report.html --> addFilter
addFilter(columnName, operatorString, primaryValue, secondaryValue)

//id_report.addFilter("date","BETWEEN","16/11/2016","18/11/2016");
//id_report.refresh();
Reply all
Reply to author
Forward
0 new messages