I am trying below functionality in RMP
1.Uploading csv file through file upload widget
2.Moving the csv data to collection
3. And i have master collection which is having complete data.
4.When i upload the csv, the elements in csv collection must have a look up in master collection and return matching elements to a have collection or html table or any other means.
Please find the detailed flow in the attachment
variable : foo
value : ${import_objects("id","testcsv", ",","true")}
<#assign my_pipeline1>
{"$group":{"_id":{"item_number":"$item_number"}}}
</#assign>
<#assign my_pipeline2>
{"$project":{"item_number":"$_id.item_number"}}
</#assign>
<#assign my_pipeline3>
{"$sort":{"item_number":1}}
</#assign>
<#assign my_pipeline1 = my_pipeline1?eval>
<#assign my_pipeline2 = my_pipeline2?eval>
<#assign my_pipeline3 = my_pipeline3?eval>
<#assign res_test=aggregate_collection("testcsv",my_pipeline1,my_pipeline2,my_pipeline3)>
${res_test}
<#assign my_pipeline1>
{"$group":{"_id":{"item_number":"$item_number"}}}
</#assign>
<#assign my_pipeline2>
{"$project":{"item_number":"$_id.item_number"}}
</#assign>
<#assign my_pipeline3>
{"$sort":{"item_number":1}}
</#assign>
<#assign my_pipeline1 = my_pipeline1?eval>
<#assign my_pipeline2 = my_pipeline2?eval>
<#assign my_pipeline3 = my_pipeline3?eval>
<#assign res_master=aggregate_collection("master",my_pipeline1,my_pipeline2,my_pipeline3)>
${res_master}
<#assign res = []><#list res_test as x><#list res_master as y><#if (x.item_nb= y.item_nb)><#assign res = res+ [y]>
</#if></#list></#list>${res}
--
Dimitri MELCHIOR
To view this discussion on the web visit https://groups.google.com/a/runmyprocess.com/d/msgid/supportforum/62e57bda-90ee-4a89-bae8-12fca214658c%40runmyprocess.com.
--
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/.
For more options, visit https://groups.google.com/a/runmyprocess.com/groups/opt_out.
--
Dimitri MELCHIOR
To view this discussion on the web visit https://groups.google.com/a/runmyprocess.com/d/msgid/supportforum/4c580cfd-16ad-44fd-9079-26488563f995%40runmyprocess.com.