Hi Rick,
Sorry, I removed the comparitor just to try to break it down as I could not achieve the desired results.
I am experiencing two problems. The count simply shows 1.0 for every row rather than the count of each collection and the user name does not display at all.
Thank you for your patience, I know it is something simple or stupid that I am doing wrong, but for the life of me... trust me I have tried to solve the problem ;-).
<xp:repeat id="repeat1" rows="100" var="rowDataSReqs">
<xp:this.value><![CDATA[#{javascript:var dbname = new Array("Titan","NCLCusto.nsf");
var users = @Unique(@DbColumn(dbname,"$xPages Fault By User",1));
var db:NotesDatabase = session.getDatabase("Titan", "NCLCusto.nsf", false);
var v:NotesView = db.getView("$xPages Fault By User");
var x;
var listarray = [];
var obj1 = {};
for (x in users)
{
obj1.numbercount = v.getAllEntriesByKey(users[x]).getCount();
obj1.username = users[x];
listarray.push(obj1);
};
var comparator = function(a,b){
var v1 = a.numbercount + " " + a.username
var v2 = b.numbercount + " " + b.username
return v1.compareTo(v2);
};
return listarray.sort(comparator)
}]]></xp:this.value>
<xp:text escape="true" id="computedField2"
value="#{javascript:rowDataSReqs.username}">
</xp:text>
<xp:text escape="true" id="computedField1"
value="#{javascript:rowDataSReqs.numbercount}">
</xp:text>
<xp:br></xp:br>
</xp:repeat>