show foundset count in label

Hi,

I know this is simple, but I’m pretty new to Servoy.

I just want to use a label to show the current count of found records.

I tried %%databaseManager.getFoundSetCount()%% w/ the displayTags property checked, but that’s not working.

Thanks.

The display tags (%%) is only valid for field names - i.e.:

%%myfield%%
%%relation.myfield%%
%%relation1.relation2.relation3.fieldname%%

You need to use a method that can be triggered on the “onShow” of a form, or “onRecordSelection” of a form.

KEEP IN MIND - if you insist on having this functionality - you will need to update it when the user creates a new record or deletes a record or duplicates a record as well.

OK, Thanks.

I’ll work on it and see what I get.

I’m trying to return a global variable globals.recCount, but the result of my method is inconsistant. I need this to work for a couple different list view forms.

globals.recCount = databaseManager.getFoundSetCount(forms[currentcontroller.getName()].foundset);

What am I doing wrong?

That code should work fine. What results are you getting? What event did you attach it to?

bcusick:
That code should work fine. What results are you getting? What event did you attach it to?

It’s attached to onShow and onRecordShow.