collection

222 views
Skip to first unread message

ideasandinno...@gmail.com

unread,
Jul 9, 2014, 2:34:52 AM7/9/14
to suppor...@runmyprocess.com
Hi

I have used a collection named user for autocomplete process. The colection have 3 fields
1. customer code no
2. customer name
3. address
The datas are fetched from google spreadsheet to the collection. I have used a code as given below.

<#assign object>
{
"customername":"${result[P_index].customername?default("")}",
"customercodeno":"${result[P_index].customercodeno?default("")}",
"address":"${result[P_index].address?default("")}"
}
</#assign>
${save_object(object,"user")}


The collection is put inside a loop with Array ${result}

The collection will throw out an error whenever the spreadsheet is empty. How can I fix this issue?
Please find attachments

collection code.png
collection process.png
error.png

banerjee...@gmail.com

unread,
Jul 9, 2014, 2:43:46 AM7/9/14
to suppor...@runmyprocess.com, ideasandinno...@gmail.com

WHAT TYPE OF ACTIVITY ARE YOU USING FOR ADD TO COLLECTION??

ideasandinno...@gmail.com

unread,
Jul 9, 2014, 2:46:00 AM7/9/14
to suppor...@runmyprocess.com, ideasandinno...@gmail.com, banerjee...@gmail.com
Hi

I am using this collection for autocomplete in another process.

Hamza Maghous

unread,
Jul 9, 2014, 4:25:47 AM7/9/14
to suppor...@runmyprocess.com, ideasandinno...@gmail.com, banerjee...@gmail.com
Hi, 
  
Result is not an array in this case, you can use freemarker function P_to_array(result) on you array to resolve this problem


On Wed, Jul 9, 2014 at 8:46 AM, <ideasandinno...@gmail.com> wrote:
Hi

I am using this collection for autocomplete in another process.

--
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/fe32ad65-037c-42a0-a52b-d3913663f3da%40runmyprocess.com.



--

Hamza MAGHOUS

PreSales Consultant

ideasandinno...@gmail.com

unread,
Jul 9, 2014, 5:01:16 AM7/9/14
to suppor...@runmyprocess.com, ideasandinno...@gmail.com, banerjee...@gmail.com
Hi

Can you show me an example? I didnt get what you have meant.

Thanks

Hamza Maghous

unread,
Jul 9, 2014, 5:39:50 AM7/9/14
to suppor...@runmyprocess.com
Alright, my bad, you can't use P_to_array to resolve the problem in this case.
If you have an error only when the spreadsheet is empty, you can use <#attempt> in freemarker so  you will not have the  error :

<#attempt>
Code that may return an error
<#recover>
code to execute in case of error
</#attempt>


--
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/.

ideasandinno...@gmail.com

unread,
Jul 9, 2014, 5:44:31 AM7/9/14
to suppor...@runmyprocess.com
Hi

Sorry. I cant understand what you meant. Can you be more specific?
Where should I add the extra codes to?

Richard Manga

unread,
Jul 9, 2014, 8:24:05 AM7/9/14
to suppor...@runmyprocess.com
Hi,

try to use the following code:

<#if (result?default([])?size!=0)>
> <#assign object>
>   {
>        "customername":"${result[P_index].customername?default("")}",
>       "customercodeno":"${result[P_index].customercodeno?default("")}",
>       "address":"${result[P_index].address?default("")}"
>   }
>   </#assign>
>   ${save_object(object,"user")}
</#if>


Regards,

Richard


--
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/.

ideasandinno...@gmail.com

unread,
Jul 9, 2014, 9:16:14 AM7/9/14
to suppor...@runmyprocess.com
Hi

Sorry. It is not working. Shows the same error as before.

Thanks

Richard Manga

unread,
Jul 9, 2014, 12:49:23 PM7/9/14
to suppor...@runmyprocess.com
Good morning,

Please, can you send me the content of the parameter "result" (you can find it in computed parameters).

Specify also data you want to extract from the result in order to build the object we use in our saveObject function.

Regards,

Richard


--
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/.

ideasandinno...@gmail.com

unread,
Jul 10, 2014, 1:38:26 AM7/10/14
to suppor...@runmyprocess.com, ideasandinno...@gmail.com
Hi

The computer parameters screenshot is attached with this mail. I need to store
1. customername
2. customercodeno
3. address
values into the collection.
The collection will store datas whenever the spreadsheet contains more than one row of details. But when the spreadsheet has only one row the collection will not get updated.

Thanks

NEW.PNG
Reply all
Reply to author
Forward
0 new messages