View Full Version : Empressa 5 MvFILTER functions
sebenza
04-20-06, 09:11 PM
Can MvFILTER still evaluate functions in the filter attribute in 5.00+?
For example:
MvASSIGN NAME="l.expr" VALUE="{'func(l.retval, ' $ l.expression $ ')'}"
MvFILTER NAME="DB" FILTER_TYPE="variable" FILTER="l.expr"
Mark Hughes
04-21-06, 12:17 AM
A partial answer, Scott, particularly in response to the word "still". No changes in the engine between 4.x and 5.x ought to have changed the way the MvFILTER tag behaves. If the function calls worked under 4.x then they should continue to work under 5.x.
Hopefully, that answer narrows down the possible sources of the problem you are troubleshooting.
Mark
sebenza
04-21-06, 01:25 AM
Hi Mark-
I just tested the same script on Empressa 4.14 and it returned the correct result. Nothing was returned on 5.03. With that said, something must have changed. Is this a bug?
Mark Hughes
04-21-06, 01:37 AM
It sounds like a bug, albeit an unexpected one.
Can you work around it successfully by evaluating the expression, assigning the result to a variable and using the variable in the FILTER attribute?
Mark
sebenza
04-21-06, 05:28 AM
Nope, because the expression is being passed from another function.
sebenza
04-21-06, 05:59 PM
OK... I found a work around for this. The function being called appears to have to be in the script before the line calling it.
vBulletin® v3.7.4, Copyright ©2000-2008, Jelsoft Enterprises Ltd.