List more than 1000 records using free marker code

219 views
Skip to first unread message

bestfri...@gmail.com

unread,
Jan 26, 2014, 11:05:33 PM1/26/14
to suppor...@runmyprocess.com
Hi Team,

Currently if we use list_objects, it is returning 1000 records only from the collection.

IS it possible to retrieve more than 1000 records using 1000 or any other freemarker code.


Thanks and Regards
Nagasai

Dimitri MELCHIOR Pro

unread,
Jan 26, 2014, 11:10:34 PM1/26/14
to RunMyProcess Support Forum, Nagasai aytha

Hi Nagasai,

You will find what you want there : http://docs.runmyprocess.com/Developer_Guide/Process/Freemarker_Examples/List_1000+_Objects

Best regards.

--
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/ffefea96-d8cb-42ed-a90b-efc31f4018ba%40runmyprocess.com.
For more options, visit https://groups.google.com/a/runmyprocess.com/groups/opt_out.

nagasai.aytha@arrisi,com

unread,
Jan 28, 2014, 4:32:31 PM1/28/14
to suppor...@runmyprocess.com, Nagasai aytha
Hi Dimitri,

The collection which i am using is having around 8 lakh records , if i use list_objects , it is not displaying anything.

Logic which i am trying ,

1.Uploading file and using import_objects loading the data to collection

2.Trying to retrieve first column which will be morethan 1000 records and approx near to 10000 records

Could you please suggest what is the best way to list more than 1000 ?

Dimitri MELCHIOR Pro

unread,
Jan 29, 2014, 11:00:52 AM1/29/14
to RunMyProcess Support Forum, Nagasai aytha
Hi Nagasai,

I think I see what you mean. You want to export all of your objects to make them being part of a the process instance variable, don't you? Actually, list_objects is not sufficient to perform this step. To bypass this, indeed, you must use inject_objects function. So, please replace the previously sent code by the one below :

<#function list_all_objects pattern collection_name index>
 <#assign list = inject_objects(list_objects(pattern,collection_name,index*1000,1000))>
 <#if (list?size = 1000)>
  <#assign list = list?eval+ list_all_objects(pattern,collection_name,index+1)>
  <#return list>
 <#else>
  <#return list?eval>
 </#if>
</#function>

<#assign my_pattern = {}>
<#assign my_collection_name = "clients">
${list_all_objects(my_pattern,my_collection_name,0)}

Best regards.

--

Dimitri MELCHIOR

PreSales Consultant

     

Fujitsu RunMyProcess user? Please add a review on GoogleApps Marketplace

Afin de contribuer au respect de l'environnement, merci de n'imprimer ce message qu'en cas de nécessité.
Be environmentally friendly: do not print this email unless it is entirely necessary.


Reply all
Reply to author
Forward
0 new messages