Hello, the notation of forms[form].foundset does not seem to work? Is this a bug or “expected behaviour”?
I am trying to do this:
var totalRecords = databaseManager.getFoundSetCount(forms[form].foundset)
This throws an error…
Hello, the notation of forms[form].foundset does not seem to work? Is this a bug or “expected behaviour”?
I am trying to do this:
var totalRecords = databaseManager.getFoundSetCount(forms[form].foundset)
This throws an error…
Hi Patrick,
The correct syntax is:
databaseManager.getFoundSetCount(foundset);
Hope this helps,
Bob Cusick
yes, I know that. But that requires that you are on the controller where the foundset “resides”. What do you do if you are on controller A and want to retrieve the total foundset of Controller X?
The usual notation for accessing Controller X is forms. What does work is
databaseManager.getFoundSetCount(forms.A.foundset)
but what doesn’t is
databaseManager.getFoundSetCount(forms[x].foundset)
That was my question
What is X?
do you have something like this:
var x = ‘X’;
forms.foundset;
or
forms[‘X’].foundset;
basically what I have is this:
var currForm = arguments[0];
var foundRecords = databaseManager.getFoundSetCount(forms[currForm].foundset)
hmm i just tested this like this:
one method:
test(currentcontroller.getName());
and then the test method:
var currForm = arguments[0];
application.output(forms[currForm].foundset.getSize());
and this works as expected.
this notation works all over the place! It just doesn’t work with databaseManager.getFoundSetCount().
It takes a while until we all get to the point here, does it?
And that is not possible.. because if my code works then setting the databasemanger call between it doesn’t matter. And i tested it:
var currForm = arguments[0];
var foundRecords = databaseManager.getFoundSetCount(forms[currForm].foundset)
application.output(foundRecords);
This works fine. As i thought because if this works:
application.output(forms[currForm].foundset.getSize());
then it will absolutly work for the above databaseManager call also.
Becaue the call databaseManager.getFoundSetCount() doesn’t have anything to do with resolving the foundset (forms[currForm].foundset)
sorry for wasting your time. It does work. I don’t know why it gave me an error yesterday, I have tried several times with the exact same notation. The error must have come from something else…