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++;
}
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.