cancel
Showing results for 
Search instead for 
Did you mean: 

Groovy Script Error adding Square [] Bracket in param

10-08-2018 6:06 AM
1721 views 4 comments Go to solution
0 Likes
SAP Managed Tags
Subscribe

Hi All,

The moment I add [](square bracket in the String param, I am unable to save the script. It keep gives me error saying that Script contain no valid function.

Removing [] square bracket from String param works fine. No clue.

Here is my script

The problem is String[] P1, If i remove the square bracket, then able to save the script. Pls help this out

error message screenshot




0 Likes

Accepted Solutions (1)

Accepted Solutions (1)

manoj_khavatkopp
Active Contributor

Hi Ansari ,

Below Script worked for me :

Br,

Manoj

Former Member
0 Likes

Hi Manoj,

I too found it meanwhile. thanks for your response

Could you pls help me out on reading sub property. for example I have

Sales node which has many sub field

Sales-->

->id

->name

->dept

can you help me reading this name field, Actually sales field is coming as list,I want to read all the names and concatenate it

manoj_khavatkopp
Active Contributor
0 Likes

Can you please share sample input XML and expected Output for the same?

Former Member
0 Likes

Sample xml content

<Sales>
 <id>101</id>
 <name>XDG</name>
 <dept>4XR1</dept>
</Sales>
<Sales>
 <id>102</id>
 <name>ZTY</name>
 <dept>6ZY1</dept>
</Sales>
<Sales>
 <id>103</id>
 <name>GER</name>
 <dept>27SD</dept>
</Sales>

Answers (0)