[pmwiki-users] PAGELIST / Math / summatory

Hans design5 at softflow.co.uk
Fri Sep 4 09:51:14 CDT 2009

Friday, September 4, 2009, 3:17:33 PM, edwin marte wrote:

> I am having a problem though trying to use sumdata with pagelist and a PTV inside the pagelist.

> {(pagelist group=Cases)}     Works.
> {(pagelist group=Cases $:Dept="Some Department")} Does Not.

> Actually my final markup will be something like the following.

> {(sumdata (pagelist group=Cases -Main -GroupFooter -RecentChanges
> $:Dept="Some Department"  $:Month={$:MthSel}) data=ValueCount)}

> Both Values $:Dept="Some Department"  and $:Month={$:MthSel} brake the pagelist. Any suggestion?

It seems there is no way to stop you from encountering the "chicken
and egg" problem!

Normal (:pagelist:) allows PTVs inside as values.
Normal markup expressions and PTVs do not allow (:pagelist:) inside
them as values.
With the {(pagelist )} markup expression we can  use PTVs
inside it, but it does not allow PTVs as values inside itself.

The only way to go with the (sumdata (pagelist...) data=...) expression
I can think of is not to use PTVs in the inner (pagelist) (because
they don't work), but use the $:Dept and $:Month PTVs inside the
sumdata function, to filter a larger pagelist.


More information about the pmwiki-users mailing list