The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

SIL page view report

Frithjof Falck
Contributor
February 4, 2022

When i try to run the script for a page view report for a single space i get the following error:

You need an array (most probably a struct array) in the first return position of the SIL script.

The space key i'm using is 3PIN. 

The script works fine when im running it for another space, with space key PLAN.

Any ideas?

Script is from this page:

https://confluence.cprime.io/display/CTR/Create+a+page+view+count+report

Page view report

struct table {
string Title;
string Views;
}

string cql = "(type=page and Space=" + argv[0] + ")";
number [] pages = selectPages(cql);

table [] tableData;

for(number p in pages) {
table t;
t.Title = p.title;
t.Views = getPersistentVar(p, "counter");
tableData += t;
}

return tableData;

Page counter

string [] allowedSpaces = "3PIN";

if(arrayElementExists(allowedSpaces, space)) {
persistent number counter = 0;
counter++;
}

0 comments

Comments for this post are closed

Community moderators have prevented the ability to post new comments.

TAGS
AUG Leaders

Atlassian Community Events