PDA

View Full Version : Using Dates in component filters


ABC123

Peter.Wayne
08-28-2004, 02:59 PM
I have one component linking to another page. I can link easily on one field with the expression

SingleNote.a5w?SingleNote_filter=account="{Account}"

This matches and brings up all records in SingleNote.a5w in which the account is the same as the {Acount} field in the calling page.
However, what I want to do is to match on several fields with this expression:
SingleNote.a5w?SingleNote_filter=account="{Account}".and.date_creat=ctod("{Date_creat}")

where "date_creat" is a date field in the table.
When I use this filter, no records match.
The string passed to SingleNote.a5w looks like a correct mix of Xbasic and HTML, e.g.,
SingleNote.a5w?SingleNote_filter=account="002176".and.date_creat=ctod("12/17/1997")

What syntax should I use for dates, or for matching multiple fields?
Thanks.

JerryBrightbill
08-28-2004, 08:25 PM
Peter

What I have been doing is using a calculated character field in a table for dates and using either a value from cdate() or a numeric character string using alltrim(str(jdate())). Since any link value must be character, this seems to work very well.

Jerry

Peter.Wayne
08-29-2004, 05:00 AM
Thanks,Jerry. Actually I found that dates work OK as well. What happened is a control character got into one of the memo fields, and that is causing a failure of the page to display properly.
- Peter