0
Total of the selected option
let vRaiting := "minRt: " + text('min. Raiting') + "| maxRt: " + text('max. Raiting');
let vRtMin := 'min. Raiting';
let vRtMax := 'max. Raiting';
let myFilter := trim(this.'Search by Artist');
let hasFilter := if length(myFilter) > 0 then true else false end;
let vArtist := trim(text(this.'Search by Artist'));
let myObject := do as server
((select Albums where 'RYM Raiting' >= vRtMin and 'RYM Raiting' <= vRtMax and Name like vArtist) order by Name).{
nid: raw(Id),
name: Name,
title: Title,
tracks: Tracks,
rym: 'RYM Raiting',
type: text(Type),
format: text(Format),
brc: BarCode
}
end;
let myDisplayObject := if hasFilter then
myObject[name = myFilter]
else
myObject
end;
let content := "
<aside class = 'grid-container'>
<header class = 'gridFormat gridTwo gridHeader1'>
<div class='tableFixHead'>
<table>
<thead>
<tr>
<th> Artista </th>
<th> Album </th>
<th> Tracks </th>
<th> Raiting </th>
<th> Type </th>
<th> Format </th>
<th> Barcode </th>
<th> ➔ Go </th>
</tr>
</thead>
<tbody>";
let mitte := for a in myObject do
"<tr>
<td style=background-color:> " +
a.name +
" </td>
<td style=background-color: >" +
a.title +
" </td>
<td style=background-color: >" +
a.tracks +
" </td>
<td style=background-color: >" +
a.rym +
" </td>
<td style=background-color: >" +
a.text(type) +
" </td>
<td style=background-color: >" +
a.text(format) +
" </td>
<td style=background-color: >" +
a.brc +
" </td>
<td style=background-color:" +
---
border="" ">
<button onclick="ui.popupRecord('{ a.nid }')">{ "Album " }</button>
--- +
" </td>
</tr>"
end +
"</header>
</div>
<tfoot>
<tr>
<th style = text-align:center>Total Albums " +
cnt((select Albums)[myObject]) +
"</th>
<th style = text-align:left scope='colgroup' colspan='7' ><sub></sub> " +
"</th>
</tr>
</tfoot>
</div>
</body>
</html>
Is there a way to have the Total of the selected option. ?
2 replies
-
This line:
cnt((select Albums)[myObject])
doesn't make sense. Why are you doing a select again? The variable myObject is the result of your filter so you only need that variable in the cnt() command.
cnt(myObject)
Content aside
- Status Answered
- 1 yr agoLast active
- 2Replies
- 73Views
-
2
Following