Array and Freemarker

509 views
Skip to first unread message

bgj...@gmail.com

unread,
Nov 23, 2017, 11:09:11 PM11/23/17
to Fujitsu RunMyProcess Developer Community, bjo...@berendsen.com.au
Hi,

I'm using an Array widget in an interface for my process, of which I'd like to convert all of the contents into HTML and then use that to create a HTML file.

At the moment I'm having difficulty looping the array in freemarker as a process output variable (however I can do it inside the interface and set to a variable there.

Could someone please provide an example on how to do this? I've included an image showing the array configuration. All fields (except "js total cost" are text input's).

Regards,

Ben Jones

array configuration.bmp
process configuration (incomplete).bmp

bgj...@gmail.com

unread,
Nov 26, 2017, 3:17:23 PM11/26/17
to Fujitsu RunMyProcess Developer Community, bjo...@berendsen.com.au, bgj...@gmail.com
Can anyone offer assistance with this?

shraddhap...@gmail.com

unread,
Nov 27, 2017, 9:57:17 AM11/27/17
to Fujitsu RunMyProcess Developer Community, bjo...@berendsen.com.au, bgj...@gmail.com
Hi Ben

Good day.

To access the variable of Web Interface in the process use Freemarker function: ${vaiable_name} as a value of the variable.
For ex.:
In Input/Output variables tab:
Name= supplier
Value= ${supplier}


In case, this is not your requirement please elaborate more on the issue you are facing.

Do feel free to contact us if you have any further queries.

Regards,
Shraddha Pangantiwar
Fujitsu RunMyProcess Support

bgj...@gmail.com

unread,
Nov 27, 2017, 3:28:18 PM11/27/17
to Fujitsu RunMyProcess Developer Community, bjo...@berendsen.com.au, bgj...@gmail.com
Hi Shraddha,

That's only part of what I'm after. Accessing the variable using the ${} syntax isn't the issue. The issue is accessing the variables inside of an array.

I want to take an array with multiple columns (e.g. 4) and rows (e.g. 10) and loop through each row of that array to extract the value of each cell in the array.


Regards,

Ben

Prachi Chandak

unread,
Nov 29, 2017, 3:17:22 AM11/29/17
to bgj...@gmail.com, bjo...@berendsen.com.au, Fujitsu RunMyProcess Developer Community
Hi Ben,

As per above discussion, it seems that you are trying to access the array widget variable into the process and you are not able to access it.
If it is the case please find below solution to access array in process.
1. Please set some name to you array widget. (Refer screenshot name_array_widget )
2. To access values in process use 'array_variable_name.coloumn_variable_name'. (Refer screenshot  access_array_column)
3. To access complete array into the loop you can refer sample code given in attachment. (Refer screenshot  sample_array_looping)

Please revert back if you still face any issue.

Thanks & Regards,
Prachi Chandak
Fujitsu RunMyProcess Support


--
Fujitsu - RunMyProcess
---
You received this message because you are subscribed to the Google Groups "Fujitsu RunMyProcess Developer Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to supportforum+unsubscribe@runmyprocess.com.
To post to this group, send email to suppor...@runmyprocess.com.
Visit this group at https://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/c5fd7252-7d6e-4245-8d43-bc5c2417a2c2%40runmyprocess.com.

sample_array_looping.JPG
access_array_column.JPG
name_array_widget.JPG

bgj...@gmail.com

unread,
Nov 29, 2017, 3:29:14 PM11/29/17
to Fujitsu RunMyProcess Developer Community, bjo...@berendsen.com.au, bgj...@gmail.com
Thanks Prachi. I'll play around with this to suit my requirements.
Reply all
Reply to author
Forward
0 new messages