0
Summe mehrerer Auswahlfelder
let all := ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Ago", "Sep", "Oct", "Nov", "Dec"];
let max := cnt(select Staff_Hours);
let result := for k in all do
sum(for i in select Staff_Hours do
if chosen(i.Month, k) then 1 end
end)
end;
let css := "<style>
.grid-container {
display:grid;
grid-template-columns:10px auto 55px;
grid-gap:1px;
}
.gridProgress{
font-size:14px;
text-align:center;
}
.gridNumbers{
font-size:14px;
color:grey;
}
.gridFooter{
font-size:14px;
color:grey;
text-align:right;
}
</style>
";
let content := "
<aside class = 'double' style='text-align:center; font-family:Helvetica; font-size:16px; color:dimgray; background-color:#FFF;'>📀 T o t a l / F o r m a t </aside><br>
<aside class = 'grid-container'>" +
for i in range(0, cnt(all)) do
"<aside class = 'gridNumbers'>" + item(all, i) +
"</aside>
<aside class = 'gridProgress'><progress max=" +
max +
" value=" +
item(result, i) +
"></progress></aside>
<aside class = 'gridNumbers'>" +
item(result, i) +
"</aside>"
end +
"
<br>
<aside class = 'gridFooter'>Total_Items: " +
sum(result) +
"
</aside>
";
html(css + content)
There are any way to sum the Hours. ? example Jan 204 Feb 306 Feb Mar 64
4 Antworten
-
I try this but don't work
let all := ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Ago", "Sep", "Oct", "Nov", "Dec"]; let max := sum(select Staff_Hours); let result := for k in all do sum(for i in select Staff_Hours do if chosen(i.Month, k) then i.sum(Hours) then 1 end end) end;
-
try this Rafael
let max := sum((select Staff_Hours).Hours); let result := for k in all do sum(for i in select Staff_Hours do if chosen(i.Month, k) then i.Hours end end) end;
Content aside
- Status Answered
- vor 1 JahrZuletzt aktiv
- 4Antworten
- 68Ansichten
-
2
Folge bereits