Subject Re: Filter problem
From Heinz Kesting <Nobody@Nowhere.com>
Date Sat, 29 Mar 2025 00:30:36 +0100
Newsgroups dbase.getting-started

Hi Charlie,
> I am having a problem filtering this.  I've tried different attempts including params with no luck.
>
> sql
>     this.COLLECTION6 = new QUERY(this)
>     with (this.COLLECTION6)
>        left = 448.0
>        width = 64.0
>        height = 37.0
>        database = form.coindata1
>        sql = "SELECT SUM(qty * estv) AS catval FROM COLLECTION"
>        active = true
>     endwith
>
> variable:
> fltr = trim(form.category1.rowset.fields["cat"].value)
>
> one of several attempts at a filter:
> form.collection6.rowset.filter = [category ='] + fltr + [']
> form.entryfield6.value = form.collection6.rowset.fields["catval"].value
>
> This gives me 'undefined: category'
>
> Any help would be appreciated!

If I understand your code correctly, you are trying to set a filter on
values in the field CATEGORY in the rowset FORM.COLLECTION6:

form.collection6.rowset.filter = [category ='] + ....

but the only field in the rowset is CATVAL, according to your SELECT
statement.
So to me it seems as if the error is saying there is no field CATEGORY
to compare the filter value FLTR with?

Just my two cents, but hope it helps?
Kind regards, Heinz


--
Diese E-Mail wurde von Avast-Antivirussoftware auf Viren geprüft.
www.avast.com