OK, I give up. I am trying to run a form filter with Object PAL but am
having surprisingly little luck. Surprising because it seems like a
simple thing to do. What I want is to display only records containing a
given value of "Recid#" in an open form. The form is based on a data
model containing a table, e.g. "MyTable.DB". I've been using code such
as the following:
method PushButton(var eventInfo Event)
var
dynFltr DynArray[] AnyType
frm Form
tc TCursor
fltrparm String
tbl Table
endVar
tbl.attach("MyTable.db")
fltrparm="aaa"
dynFltr["Recid"]=fltrparm
tbl.setGenFilter(dynFltr)
endmethod
The setGenFilter seems to work because if I do a tbl.cCount, it
returns the appropriate number(e.g. 3 of 10 records in the table have
Recid="aaa"). However, the resulting filtered data is in a TCursor object
that is not recognized by the form, i.e. the form still displays all 10
records. I tried using the dmAttach method to associate the TCursor
generated by setGenFilter to "MyTable.DB" which was successful (returned
"True") but the form itself was still displaying all the records in
"MyTable.DB" and not just the subset of records reflected by the filter.
Can anyone shed light on what I'm missing?
Thanks in advance,
Jude Maghirang
*ia Health Quality Center