List footer information

Hi

I would like to show the following information in list footers:
/ e.g.
187 / 234 invoices
or
0 / 0 invoices
if the list is empty. And we would like to define this string in one field or label only, to avoid alignment problems.

Standard tags offer %%selectedIndex%%. But the displayed string is empty if the list is empty. I also find %%maxRecordIndex%% which is the max index of the loaded foundset (200, 400 etc.). It is also empty if the list is empty. Using these tags, the information displayed is
187 / 200 invoices
and
/ invoices
if the list is empty.

If I use my own aggregate (%%numberOfInvoices%%), which counts the records of the foundset, instead of %%maxRecordIndex%%, the result is
187 / 234 invoices
and
/ invoices
if the list is empty. Why is the string still empty? If I use the aggregate as dataprovider for a field, the displayed string is “0”.

And I see %%lazyMaxRecordIndex%%. What is this tag for?

Can you help me? How do you display this information (also with empty lists)? Could Servoy extend the list of standard tags?

Thanks and regards

Hi Birgit,

I made this by taking formvariables instead of the Standard Tags, because I have had the same problem.
In my onShow functions I fill the formvariables I would like to display as info and on every change of the foundset/dataset on the form. But there is still an issue in displaying the integer value in a label. Some times Servoy displays it as decimal like ###,## (!?) what’s not be nice. The only way to fix that is currently to take dataprovider not labels. That is also not nice and posted in the forum (http://forum.servoy.com/viewtopic.php?f=8&t=13544) at the beginning of the year!

Cheers
Thomas

Thanks, Thomas, for sharing your solution.

I’m sure, this is standard requirement. And I wonder why there is no better solution offered by Servoy.

Merry Christmas, Thomas, and hope to see you in 2011 :)