Calling scripts from Reports

I have created three Ticket Tags: A, B and C. I need to report A and B as they are and C as three different columns since the value of C is a comma separated list.

This 3 column report would work:


it generates:

a1 b1 c1
a2 b2 c2

I have a script called Utils.Split that will give me a value on a comma separated list. I need to produce this 5 column report:

{REPORT TICKET DETAILS:TT.A,TT.B,{CALL:Utils.Split(TT.C, 0)},{CALL:Utils.Split(TT.C, 1)},{CALL:Utils.Split(TT.C, 2)}:(TT=A)}

But it does not work. It only shows:

a1   b1 
a2   b2 

And what I am looking for is:

a1   b1   c1(0)   c1(1)   c1(2)
a2   b2   c2(0)   c2(1)   c2(2)

Can CALL be used in this scenarios?

Do the input variables not need to be quoted in scripts?

1 Like

I don’t think you can use {CALL:X} in Report Tag.
I think you have to do the other way around. Using Report Tag in Call script.

If it’s a simple split script try using straight [=xxxx] calculation expression as basic jscript functions are available within calculations without using a seperate script.

1 Like