View Full Version : how to put function on query.filter


Romy Huang
01-27-2005, 11:01 AM
I want to put wordat(upper(user_name(),REP_NAME) on the query.filter. I try serval different ways. But it didn't work. Any one know to put function on the query.filter. Thank in advance.


Lenny Forziati
01-27-2005, 11:17 AM
wordat() returns a number and the qury.filter need to me a character value. What is the filter you are ultimately after? wordat() gives you the position of a word within a string, so it doesn't seem like a likely filter candudate to me.

Romy Huang
01-27-2005, 11:31 AM
oops, it is wordat(user_name(), REP_NAME)"0

Romy Huang
01-27-2005, 11:32 AM
"wordat(user_name(), REP_NAME)"0"

Bill Warner
01-27-2005, 01:25 PM
It looks like your filter is supposed to find the string USERNAME() in the field REP_NAME (although the () at the end of USERNAME makes is look like a function - is it really supposed to be there?).

If this is the case, another way to write the filter:

query.filter = " 'username()' $ rep_name "

This should work, assuming you want the value "username()".