I have a collection with the following columns: class_name, class_admin, class_start_date and class_end_date.
Need to query this collection in a process output variable freemarker script to read the class_name for which the current date falls between the class_start_date and class_end_date. For this I wrote the following code (please see below), but it does not seem to work. Does anybody have a working sample of this genre of RMP Collection queries? (Just FYI - I tried load_object as well, that does not seem to work as well)
_____________________________________________________________________________
<#assign todaysdate = get_date(now(),"yyyy-MM-dd HH:mm:ss")>
<#assign my_pattern>
{"${todaysdate}": {"$gte":"class_start_date"}, "${todaysdate}": {"$lt":"class_end_date"}}
</#assign>
<#list list_objects(my_pattern,"my_collection",0,1) as x>
<#assign class_name=x.class_name>
</#list>
${class_name}
_____________________________________________________________________________
Thanks!
--
Fujitsu - RunMyProcess
---
You received this message because you are subscribed to the Google Groups "RunMyProcess Support Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to supportforum...@runmyprocess.com.
To post to this group, send email to suppor...@runmyprocess.com.
Visit this group at http://groups.google.com/a/runmyprocess.com/group/supportforum/.
To view this discussion on the web visit https://groups.google.com/a/runmyprocess.com/d/msgid/supportforum/d9dfdcd8-26cb-4cf3-878f-a3e60c5b6f38%40runmyprocess.com?hl=en.
For more options, visit https://groups.google.com/a/runmyprocess.com/groups/opt_out.
For the other suggestion that you have to replace the string comparison with an actual timestamp, how do I proceed with that? I replaced the the get_date and now I am using the following snippet to generate todaysdate (without touching anything else in my script) and the query seems to be working fine:
<#assign todaysdate = now("yyyy-MM-dd HH:mm:ss")>
Thanks!
Thanks!
--
Fujitsu - RunMyProcess
---
You received this message because you are subscribed to the Google Groups "RunMyProcess Support Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to supportforum...@runmyprocess.com.
To post to this group, send email to suppor...@runmyprocess.com.
Visit this group at http://groups.google.com/a/runmyprocess.com/group/supportforum/.
To view this discussion on the web visit https://groups.google.com/a/runmyprocess.com/d/msgid/supportforum/9d4eae78-23f4-429e-9b72-eddd89466d6e%40runmyprocess.com?hl=en.
Appreciate your help again!